Jump to content

Is it possible to make an sprite re-spawn after a short time


LearningPhaser9
 Share

Recommended Posts

You have to do it manually.

Actually, when you are killing an object, use myObj.kill() so it'll be disabled and invisible.

Once you want to "respawn" it, change its position to where you want it to spawn and use myObj.revive().

Link to comment
Share on other sites

You have to do it manually.

Actually, when you are killing an object, use myObj.kill() so it'll be disabled and invisible.

Once you want to "respawn" it, change its position to where you want it to spawn and use myObj.revive().

Say i call my variables player and spike.

 

and I want to the spike to kill the player. I wrote it like this but, it does not work

 
 
function spikekills (player,spike){
  spike.kill();
}
 
Maybe I am doing something wrong.
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...