Destroying other actors
Hi, I've nearly finished off my game but I'm stuck at destroying other actors.
Basically when bullet hits x, x + y should die. I would normally use an attribute and set it to true / false depending on it's state but theres at times up to 50 enemies at the same time and I can't be arsed setting 50 different attributes. So how can I do this ?
Cheers
Basically when bullet hits x, x + y should die. I would normally use an attribute and set it to true / false depending on it's state but theres at times up to 50 enemies at the same time and I can't be arsed setting 50 different attributes. So how can I do this ?
Cheers
Best Answer
-
Elfizm Posts: 489
Just throwing ideas out here @LyboTech
But why not put a rule in the weapon that if it is not overlapping with enemy destroy self.
Assuming that your weapon does overlap with the enemy, if the enemy does get destroyed the weapon wilbi it be overlapping anything hence why it gets destroyed too.
Just an idea
Elfizm
Answers
Are these enemies on stage when the game/level starts or do they spawn?
Give some details on how the enemies are implemented into your game and I'm sure we can give some suggestions.
Screen shots are a plus
I've got a player and an enemy (numerous of the same actor). When the player shoots the enemy I want it to destroy both the enemy and it's weapon which is two different actors. - The weapon is constrained to the enemy and it looks weird when it just hangs in mid-air doing nothing :P