Destroying dots on miniMap...?

allc1865allc1865 Member, PRO Posts: 777
Hey guys. On my miniMap I have dots the represent the enemies in my game. After I kill all the enemies, there's always one enemy dot left on my map that's not an enemy. How would I destroy the dot after all enemies are killed?
Thanks :)

Best Answer

  • Braydon_SFXBraydon_SFX Posts: 9,273
    Accepted Answer
    That dot is an actor, so you could arrange something like this:

    Create an Integer game Attribute called "HowMany." Leave the value at 0 for now.

    In your enemy actor, add a Change Attribute:
    Change Attribute: game.HowMany to game.HowMany+1

    Make sure that the Change Attribute behavior is at the top of your logic stack.

    Next, when you destroy an enemy, add a Change Attribute:
    Change Attribute: game.HowMany to game.HowMany-1


    Then create a rule in your dot actor:
    When attribute: game.HowMany = 0
    Destroy


Answers

Sign In or Register to comment.