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

#1 2013-01-06 16:23:40

gbhuyan
New Scratcher
Registered: 2013-01-06
Posts: 3

Random Sprite Spawner

I am woking on a game on scratch, involving shooting enemies and them re-spawning somewhere. Right now i have the basic idea down, but I am having trouble figuring out how to make a Random Sprite Spawner. Please help with this, I am new but i love scratch. thanks!

Offline

 

#2 2013-01-06 16:27:53

fetchydog567
Scratcher
Registered: 2011-12-28
Posts: 500+

Re: Random Sprite Spawner

gbhuyan wrote:

I am woking on a game on scratch, involving shooting enemies and them re-spawning somewhere. Right now i have the basic idea down, but I am having trouble figuring out how to make a Random Sprite Spawner. Please help with this, I am new but i love scratch. thanks!

Belongs to Help with Scripts, I guess i'll report it to be moved?


http://www.minecraftanonymous.com/assets/banners/banner_51.pngJust a reminder I won't be on Scratch that much but I 'll still be here, so if i'm on something, I will be commenting back, okay! wink , PICO Team!!!!!!!!!!! SCRATCH DEADW!!! PICO HACK ACCOUTNTT@@

Offline

 

#3 2013-01-06 16:35:17

gbhuyan
New Scratcher
Registered: 2013-01-06
Posts: 3

Re: Random Sprite Spawner

fetchydog567 wrote:

gbhuyan wrote:

I am woking on a game on scratch, involving shooting enemies and them re-spawning somewhere. Right now i have the basic idea down, but I am having trouble figuring out how to make a Random Sprite Spawner. Please help with this, I am new but i love scratch. thanks!

Belongs to Help with Scripts, I guess i'll report it to be moved?

oh, yes i am new to scratch didn't see that part...

Offline

 

#4 2013-01-06 23:07:26

OrcaCat
Scratcher
Registered: 2010-06-30
Posts: 500+

Re: Random Sprite Spawner

Try this:

when gf clicked
forever
wait until <I am killed>
go to x: (pick random (-240) to (240)) y: (pick random (-180) to (180))
end
I hope this helps!

Last edited by OrcaCat (2013-01-06 23:10:01)


     Awesome music     Electrode's theme     Epic music
Bye, 1.x.  sad                             Hello, 2.x!  smile

Offline

 

#5 2013-01-07 10:28:41

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Random Sprite Spawner

OrcaCat wrote:

Try this:

when gf clicked
forever
wait until <I am killed>
go to x: (pick random (-240) to (240)) y: (pick random (-180) to (180))
end
I hope this helps!

This ^ if you want to have a sprite for each enemy, otherwise, there are list based alternatives


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

Board footer