T
Tom_SavePointsGames
Guest
So I have a set of enemies with an inheritance tree and a set of bullets with an inheritance tree.
I want different bullets to deal to different enemies based on the type of bullet and that enemies particular weaknesses.
so I know to use collision checking using place meeting but that's pretty much it. I feel like whenever I run into a problem my solution is just to add global variables but I don't know if there is a down side to having like 100 global variables.
I can easily give each child bullet a damage value and type and then when the collision even checks for the parent bullet then the enemy itself could run a check against the global variables set for the bullet type and damage.
If I keep doing this for each solution the global variables will get out of hand. Is that a bad thing? and is there a better solution?
Thanks!
I want different bullets to deal to different enemies based on the type of bullet and that enemies particular weaknesses.
so I know to use collision checking using place meeting but that's pretty much it. I feel like whenever I run into a problem my solution is just to add global variables but I don't know if there is a down side to having like 100 global variables.
I can easily give each child bullet a damage value and type and then when the collision even checks for the parent bullet then the enemy itself could run a check against the global variables set for the bullet type and damage.
If I keep doing this for each solution the global variables will get out of hand. Is that a bad thing? and is there a better solution?
Thanks!