Discuss Scratch

jackal2013
New to Scratch
16 posts

The clones kill my player

In my game I would like to have spikes come at the user and the user has to jump over. But the clones are not killing him and resting. This is my script.
when I start as a clone
wait (0.1) secs
go to x: (208) y: (3)
glide (1.5) secs to x: (208) y: (3)
wait until <touching [edge v]?>
if <touching [sprite 1 v]?> then
broadcast [Player dead v]
broadcast [Game over v]
stop [This script v]

end

hide
delete this clone
end
Can you please tell me whats wrong.
jackal2013
New to Scratch
16 posts

The clones kill my player

Sorry that last block should not be there and the “hide” and “delete this clone” are connected
drmcw
Scratcher
1000+ posts

The clones kill my player

wait until touching edge will do just that! Only when it gets to the edge will it then start the blocks to detect the player, but that will run just once.
Change to wait until touching edge OR touching sprite1

Scratchblocks aren't working in IE at the moment so cannot write them or read the scripts properly either. Just noticed that you use glide so there is no need to use touching edge so remove that and just wait until touching sprite1.

Last edited by drmcw (Jan. 25, 2014 20:02:31)


10 !
ScratchVaders or Galaga?
Maybe Eliza can help you decide?
MMHMMH
Scratcher
100+ posts

The clones kill my player

Instead of broadcasting ‘player dead’ you can put
when green flag clicked
forever

if <touching [spike v]?> then

broadcast [you lose v]
end
hide
end
in the script for the person.

I don't know if this will fix or even if it's better than your first one, but it might help.

Last edited by MMHMMH (Jan. 25, 2014 21:47:15)


I don't feel like writing a signature….
jackal2013
New to Scratch
16 posts

The clones kill my player

I have that but that doesn't have the clones kill him.

Powered by DjangoBB