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

#1 2008-08-23 21:33:17

DOCTORWHODUDE
Scratcher
Registered: 2008-08-17
Posts: 10

...how do i make my enemy shoot back...

how do i make my enemy shoot back. could someone pledase give the script please
and thanks.
-doctor who dude

Offline

 

#2 2008-08-24 11:49:04

06dknibbs
Scratcher
Registered: 2008-01-29
Posts: 1000+

Re: ...how do i make my enemy shoot back...

<(  <=>  )>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


http://i404.photobucket.com/albums/pp129/06dknibbs/Untitled-3-6.jpg

Offline

 

#3 2008-08-24 12:11:34

DOCTORWHODUDE
Scratcher
Registered: 2008-08-17
Posts: 10

Re: ...how do i make my enemy shoot back...

thanks ill try it.  smile   <(*-*)>

Offline

 

#4 2008-08-24 12:32:31

terminator355
Scratcher
Registered: 2008-07-31
Posts: 100+

Re: ...how do i make my enemy shoot back...

also if you need code help dont post a new topic look, there is a topic just for code help  big_smile


No new stuff for now guys  wink  join me for some Black Ops on xbox: termhn or for some rock band on PS3: rocket232

Offline

 

#5 2008-08-24 13:09:38

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: ...how do i make my enemy shoot back...

DOCTORWHODUDE wrote:

thanks ill try it.  smile   <(*-*)>

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


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#6 2008-08-24 13:56:25

06dknibbs
Scratcher
Registered: 2008-01-29
Posts: 1000+

Re: ...how do i make my enemy shoot back...

Bluestribute wrote:

DOCTORWHODUDE wrote:

thanks ill try it.  smile   <(*-*)>

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.


http://i404.photobucket.com/albums/pp129/06dknibbs/Untitled-3-6.jpg

Offline

 

#7 2008-08-24 14:00:24

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: ...how do i make my enemy shoot back...

06dknibbs wrote:

Bluestribute wrote:

DOCTORWHODUDE wrote:

thanks ill try it.  smile   <(*-*)>

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


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#8 2008-08-24 14:03:48

06dknibbs
Scratcher
Registered: 2008-01-29
Posts: 1000+

Re: ...how do i make my enemy shoot back...

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.


http://i404.photobucket.com/albums/pp129/06dknibbs/Untitled-3-6.jpg

Offline

 

#9 2008-08-24 14:10:46

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: ...how do i make my enemy shoot back...

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


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#10 2008-08-24 14:50:44

terminator355
Scratcher
Registered: 2008-07-31
Posts: 100+

Re: ...how do i make my enemy shoot back...

how do you modify your signature  hmm


No new stuff for now guys  wink  join me for some Black Ops on xbox: termhn or for some rock band on PS3: rocket232

Offline

 

#11 2008-08-24 14:55:56

06dknibbs
Scratcher
Registered: 2008-01-29
Posts: 1000+

Re: ...how do i make my enemy shoot back...

terminator355 wrote:

how do you modify your signature  hmm

Go into profile then choose display and change it there p.s you should have put this in  different topic where it fits anyway that's how


http://i404.photobucket.com/albums/pp129/06dknibbs/Untitled-3-6.jpg

Offline

 

#12 2008-08-24 14:56:47

DOCTORWHODUDE
Scratcher
Registered: 2008-08-17
Posts: 10

Re: ...how do i make my enemy shoot back...

Thanks Guys

Offline

 

#13 2008-08-24 14:57:32

terminator355
Scratcher
Registered: 2008-07-31
Posts: 100+

Re: ...how do i make my enemy shoot back...

ya, sry, was too lazy, anyway thx for help and lets work on tut.


No new stuff for now guys  wink  join me for some Black Ops on xbox: termhn or for some rock band on PS3: rocket232

Offline

 

Board footer