evildead9000
Member
I'm in the somewhat early stages of developing a game. I have a decent system for enemy AI as well as various weapons, and magic for the player.
However, I am not sure how to implement a manageable system for weapon/magic affects on different types of enemies. For example, what is the easiest way to manage the effectiveness of 10 different attacks of magic and weaponry to 10 different types of enemies?
To clarify: If an ice blast collided with an enemy, I would like to quickly determine the affect on the enemy. Obviously, I don't want to have numerous "if" statements. Is the enemy vulnerable to ice attacks? (-10 HP or so) Or immune (-0 HP)? Or is it slightly effective (-2 HP)?
I think it may be a combo of ds_maps, and switches, but I'm really lost as to how to begin coding something efficient.
(I think I butchered the usage of "affect" and "effect" Lol!!)
I would greatly appreciate some guidance/info on best practices.
However, I am not sure how to implement a manageable system for weapon/magic affects on different types of enemies. For example, what is the easiest way to manage the effectiveness of 10 different attacks of magic and weaponry to 10 different types of enemies?
To clarify: If an ice blast collided with an enemy, I would like to quickly determine the affect on the enemy. Obviously, I don't want to have numerous "if" statements. Is the enemy vulnerable to ice attacks? (-10 HP or so) Or immune (-0 HP)? Or is it slightly effective (-2 HP)?
I think it may be a combo of ds_maps, and switches, but I'm really lost as to how to begin coding something efficient.
(I think I butchered the usage of "affect" and "effect" Lol!!)
I would greatly appreciate some guidance/info on best practices.