In my game I'm making spells, each for a different type of weapon. What's a scalable and efficient way of handling weapon type checks for each of the spells? I figured that running a check for each weapon every time you want to cast a spell wouldn't be great, so my next idea was to implement a common event that gets called every time you change equipment - problem is, it'd be a colossal event that checks through every type of weapon (don't think that'd be very performant). Is there a way to attach a common event to an item, so that when it's equipped I can change some variable? Or maybe there's a better way to implement the system I'm trying to go for.
Question
IVeve
In my game I'm making spells, each for a different type of weapon. What's a scalable and efficient way of handling weapon type checks for each of the spells? I figured that running a check for each weapon every time you want to cast a spell wouldn't be great, so my next idea was to implement a common event that gets called every time you change equipment - problem is, it'd be a colossal event that checks through every type of weapon (don't think that'd be very performant). Is there a way to attach a common event to an item, so that when it's equipped I can change some variable? Or maybe there's a better way to implement the system I'm trying to go for.
Link to comment
Share on other sites
6 answers to this question
Recommended Posts