Respawn enemies when actor is destroyed

AyubAyub Member Posts: 8
Hi guys,

I have a side scrolling game with enemies placed in specific positions, when i attack the enemies they are destroyed. However when i press the reset button (for the level) or the actor dies, the enemies are no longer shown.

Any tips on how i can spawn the enemies in the same place i positioned it every time the player goes back to the level or dies/restarts the level.

Regards

Comments

  • -Timo--Timo- Member Posts: 2,313
    place an actor use the spawn actor behavior. :)
  • AyubAyub Member Posts: 8
    place an actor use the spawn actor behavior. :)
    how would i use the spawn behaviour to spawn the actor every time to game resets/starts?

  • AyubAyub Member Posts: 8
    anybody? :)
  • ycanycan Member, PRO Posts: 207
    create a reset (BOOL) attribute, than when you pressed reset button change attribute ->yes, if reset attribute yes, spawn actor
  • -Timo--Timo- Member Posts: 2,313
    just create a actor on the place where the enemy should spawn and say
    spawn actor 'enemy'

    if reset button is pressed
    do
    reset scene
Sign In or Register to comment.