Discuss Scratch

bananabehemoth
New to Scratch
2 posts

Combine movement script with timer script

I have these two scripts:

repeat until <<touching [mouse pointer v]?> and <mouse down?>>
move (10) steps
if <touching [edge v]?>
turn left (180) degrees
end
end
reset timer
switch costume to [dead v]
wait (2) secs
hide
change [level v] by (1)

wait until <(timer) > (5)
hide
set [level v] to (0)
stop [other scripts in sprite v]

I need to combine these two into one script, so that when the timer goes over five, script 1 stops and the rest of script 2 starts.
Right now they only work separately.

Any ideas?

Last edited by bananabehemoth (Aug. 31, 2013 03:43:47)

drmcw
Scratcher
1000+ posts

Combine movement script with timer script

I think your game needs a rethink first.by using repeat until touching mouse pointer and mouse down all someone has to do is just keep the mouse button pressed and just move the mouse to the sprite and it's dead or as all the sprite is doing is moving backwards and forwards hold the mouse button down and ensure the pointer is somewhere on the sprites path and it'll run straight into it.

10 !
ScratchVaders or Galaga?
Maybe Eliza can help you decide?
scubajerry
Scratcher
1000+ posts

Combine movement script with timer script

Regardless if it is a good idea,. I think you need to make the WAIT an IF and put script 2 inside the IF. Then put that inside the script 1 loop
bananabehemoth
New to Scratch
2 posts

Combine movement script with timer script

scubajerry wrote:

Regardless if it is a good idea,. I think you need to make the WAIT an IF and put script 2 inside the IF. Then put that inside the script 1 loop
Thanks a lot, I don't know how I missed that.

Powered by DjangoBB