LearningPhaser9 Posted August 3, 2015 Share Posted August 3, 2015 Because Im looking around in tutorials and I can't seem to find one. Also, why do some tutorials have "this.physcis.arcade " while, I am using"game.physics.arcade".* notice I am using phaser 2.0.1 Sorry Im so new phaser and javascript at the same time. Link to comment Share on other sites More sharing options...
ZoomBox Posted August 4, 2015 Share Posted August 4, 2015 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 More sharing options...
LearningPhaser9 Posted August 4, 2015 Author Share Posted August 4, 2015 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 More sharing options...
ZoomBox Posted August 5, 2015 Share Posted August 5, 2015 You want the player to be killed so you have to doplayer.kill()then you set a new position to the player (which is invisible)then you callplayer.revive() Link to comment Share on other sites More sharing options...
LearningPhaser9 Posted August 5, 2015 Author Share Posted August 5, 2015 Thats odd, It doesn't seem to work for me. It doesn't go invisible. Nothing happens in general. Link to comment Share on other sites More sharing options...
Recommended Posts