Jump to content
  • 0
Sign in to follow this  
Vallar

Are we able to make generic events?

Question

Hey guys, 

 

I am trying to create an abilities system where you gain ability by reading a tome for example. However I found myself duplicating A LOT of work needlessly but I can't think of something different to do to minimize this. So basically let's say I have melee, ranged, magic, crafting, etc... skills and each skill needs a tome to be bought to learn that skill. I created a switch for each one of them to identify whether the player learned it or not (if learned they don't learn it again). But then I had to create an even for each one so it says text related to the tome used. Is there a way to do this similar to the code:
UseTome(SkillType _type)

{

//Type whatever text pulled from _type information.

}

 

Basically just a generic event that I feed something to based on the item used and that would just then act accordingly?

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Best solution is to wait until source is out and actually code it. Would be 100x quicker. 

 

If it's imperative that you get this done sooner rather than later then stay the course.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×
×
  • Create New...