Jump to content
  • 0

Are we able to make generic events?


Vallar

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?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

×
×
  • Create New...