In my current game, I'm trying to implement homing missiles. I'm stuck on how to have a reference to the target that they're following.
I have a type Tenemy, which is the base type for all enemies in the game, and would like each homing missiles to pick an enemy from a Tlist (which contains all TEnemy instances) as their target.
However, I'm unsure of how to do this. My original thought was to have an object pointer to the missile's target, however this apparently isn't allowed in BlitzMax.
I need the information from the target so that I can have the missile follow it around.
Please tell me if I explained it badly, I wasn't sure how to put it into words.
I have a type Tenemy, which is the base type for all enemies in the game, and would like each homing missiles to pick an enemy from a Tlist (which contains all TEnemy instances) as their target.
However, I'm unsure of how to do this. My original thought was to have an object pointer to the missile's target, however this apparently isn't allowed in BlitzMax.
I need the information from the target so that I can have the missile follow it around.
Please tell me if I explained it badly, I wasn't sure how to put it into words.