Discuss Scratch

GamerBoyBahrain
New to Scratch
1 post

help with moving enemy and dead enemy

Hello,
I'm new to scratch ,, all the projects I did were pretty basic following youtube videos from scratch channel, so probably this project I'm working on is advanced for me and I'm stuck

I need help with the script of the trolls (enemy)
1- how the clone can appear with time difference and run towards me
2- cause harm to me if I didn't shoot and they got so close to me
3-how when I shoot at it it changed skin to dead and disappear then appear somewhere else after few seconds

please help

https://scratch.mit.edu/projects/523969128/
The_Imaginarium
Scratcher
1000+ posts

help with moving enemy and dead enemy

You're going to want to have the trolls appear in different places and walk towards player
forever
wait (# :: #969696) secs // the frequency of the trolls
create clone of [myself v] // when dealing with enemies, clones are a good choice because they are easy to control
end

when I start as a clone // Tells the clone what to do
go to x: (pick random (x1 :: #969696) to (x2 :: #969696)) y: (pick random (y1 :: #969696) to (y2 :: #969696)) // replace grey inputs with the desired numbers
forever // it wont actually run forever
next costume
change size by (2) //moves toward the player
if <<touching [the aiming target v] ?> and <mouse down?>> then
switch costume to [dead v]
wait (... :: #969696) secs
delete this clone // delete this clone
end
end

Powered by DjangoBB