how do i make my enemy shoot back. could someone pledase give the script please
and thanks.
-doctor who dude
Offline
<( <=> )>Well it's a few scripts but i can tell you them the first thing though is to create an enemy sprite an enemy shoot sprite and a variable called enemy fire.
After that make these scripts in the enemy fire sprite
the first script
[blocks]<when green flag clicked><forever><change{enemy fire }by( <pick random( 1 )to( 10[/blocks]
the second script
[blocks]<when green flag clicked><forever><if><(<{enemy fire }> <=> 5 )><go to[ Enemy<repeat until><< <touching[ edge <or><touching[ good guy >><change x by( -10[/blocks]
this should make evrything work p.s good guy is whatever you call the person you play as. hope this helps
Offline
thanks ill try it. <(*-*)>
Offline
also if you need code help dont post a new topic look, there is a topic just for code help
Offline
DOCTORWHODUDE wrote:
thanks ill try it.
<(*-*)>
It won't work. The movement part at least. Use <move( )steps> instead of <change x by( cause you never know what direction you will be facing
Offline
Bluestribute wrote:
DOCTORWHODUDE wrote:
thanks ill try it.
<(*-*)>
It won't work. The movement part at least. Use <move( )steps> instead of <change x by( cause you never know what direction you will be facing
Yeah but if you use change Xby -10 it moves 10 steps left and change Xby 10 it moves right and it's a lot more smooth. i get your point thow it's just with steps it has a slight pause.
Offline
06dknibbs wrote:
Bluestribute wrote:
DOCTORWHODUDE wrote:
thanks ill try it.
<(*-*)>
It won't work. The movement part at least. Use <move( )steps> instead of <change x by( cause you never know what direction you will be facing
Yeah but if you use change Xby -10 it moves 10 steps left and change Xby 10 it moves right and it's a lot more smooth. i get your point thow it's just with steps it has a slight pause.
But what if you aren't shotting left? What if you are shotting right? Or up? Tat is why you use the move 10 steps block. Or come up with some complicated equation with the Glide block
Offline
06dknibbs wrote:
ok i get your point lets not argue about who's right and spam up this post the fact is both of them work and that's all there is to it.
lol, to a point, you are correct
Offline
how do you modify your signature
Offline
Thanks Guys
Offline
ya, sry, was too lazy, anyway thx for help and lets work on tut.
Offline