|
Post by hendrikbez on Sept 19, 2016 8:21:16 GMT
I am trying to so that when my main sprite is killed, it must come back near to the place he has been killed. I did got this code from Facebook, but it does not work.
This is my old code events/ kill player
beep 145 fade let line = 23 let column = 8 display lives subtract 1 from lives if lives = 0 let line = 10 let column = 10 colour 84 message 0 delay 250 endif
The code i am trying to get to work
beep 145 fade let line = 23 let column = 8 display lives subtract 1 from lives if lives > 1 if c = 0 if image = 0 remove subtract 1 from lives let line = 10 let column = 10 colour 84 spawn 0 0 endif endif else if lives = 0 let line = 10 let column = 10 colour 84 message 0 delay 250 endif endif
|
|
|
Post by andrewvanbeck on Sept 19, 2016 13:14:40 GMT
I think you should get rid of the remove command, and recycle instead - like rather than remove and respawn, just reset the sprite image and frame etc to bring it back to life.
You could use variables to store the X and Y coordinates of the sprite, when the sprite can't go down for example, then use that to reset the sprite, like set the sprite frame and image then the position, rather than removing and respawning.
|
|
|
Post by lukebord1 on Sept 26, 2016 1:24:34 GMT
|
|