LearningPhaser9 0 Posted August 3, 2015 Report 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. Quote Link to post Share on other sites
ZoomBox 20 Posted August 4, 2015 Report 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(). Quote Link to post Share on other sites
LearningPhaser9 0 Posted August 4, 2015 Author Report 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. Quote Link to post Share on other sites
ZoomBox 20 Posted August 5, 2015 Report 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() Quote Link to post Share on other sites
LearningPhaser9 0 Posted August 5, 2015 Author Report Share Posted August 5, 2015 Thats odd, It doesn't seem to work for me. It doesn't go invisible. Nothing happens in general. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.