This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-06-22 16:56:48

XxEliteJJzZ
New Scratcher
Registered: 2012-01-11
Posts: 6

Respawn Help?

Okay, I have my puzzle / challenge game and you complete challenging levels and when you die you respawn at the start of the game...

I want it so you respawn at the start of that level  tongue

heres my game if you need to look  tongue
http://scratch.mit.edu/projects/XxEliteJJzZ/2628882

Offline

 

#2 2012-06-22 18:16:22

wahoo77
New Scratcher
Registered: 2012-06-17
Posts: 27

Re: Respawn Help?

Use variables for the levels instead of broadcasts
use this

If <touching [finish point]>
change [level] by [1]
instead of
If <touching [finish point]>
broadcast [stage completed]

Offline

 

#3 2012-06-23 04:16:33

XxEliteJJzZ
New Scratcher
Registered: 2012-01-11
Posts: 6

Re: Respawn Help?

This didnt help as the broadcasts make it switch level soo  sad

Offline

 

#4 2012-06-24 10:35:01

powerpoint56
Scratcher
Registered: 2012-04-19
Posts: 500+

Re: Respawn Help?

To re-spawn you will first need your character to re-spawn at the start of your level. Let's say it starts at x: -230, y: -170 (About at the farthest left and down you can go on the screen). You would do this:

when gf clicked
set [level v] to (1)
forever
set background
if <touching color [color of lava]?>
go to x:(-230) y:(-170)
change [level v] by (0) // I don't think this is necessary; I just threw it in :)
end
if <touching color [color of the endpoint of your level]?>
change [level v] by (1)
go to x:(-230) y:(-170)
end
end
I hope this helped! If this wasn't what you were looking for, let me know!

EDIT: Oh, and for the background, do...
when gf clicked
forever
switch to background (level)
end

Last edited by powerpoint56 (2012-06-24 10:36:14)


http://i48.tinypic.com/2072ctw.gif

Offline

 

Board footer