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

#1 2012-06-12 18:15:33

nathanh123
Scratcher
Registered: 2012-02-17
Posts: 11

anyone know how to make an emitter?

hi im making a 2d platform zombie survival game, ive finnished all of the basics so now its time to add in the enamy. there is going to be ten seperate rounds with different types of zombies, for each round i want to have a certain number of zombies, but rather than making many seperate sprites can i just run the whole round's enamies off of the one script???... does that make sense?

Offline

 

#2 2012-06-12 18:23:33

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: anyone know how to make an emitter?

It does make sense, the project in my signature have sort of what you need, altough the second or third games in the series would be a better example. Download -2 or -3 and look at those scripts. That will work!  smile


Why are the secret organizations getting all the attention?  mad

Offline

 

#3 2012-06-12 18:32:38

RenCamposYo
New Scratcher
Registered: 2012-06-12
Posts: 4

Re: anyone know how to make an emitter?

I can see why you would want to make it so that each round one script, but I don't think it's possible with Scratch. you'd probably be better off making seperate sprites for each zombie, duplicate the scripts and modify it so that the zombies appear on certain levels.
Mabye you could have the same zombie respawn in the same round. If you make them seperate sprites you can make them spawn mrore randomly. Well that's my input, let me know how your game turns out, I'm a huge fan of zombie games (cod zombies)

Offline

 

#4 2012-06-13 03:55:11

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: anyone know how to make an emitter?

RenCamposYo wrote:

I can see why you would want to make it so that each round one script, but I don't think it's possible with Scratch. you'd probably be better off making seperate sprites for each zombie, duplicate the scripts and modify it so that the zombies appear on certain levels.
Mabye you could have the same zombie respawn in the same round. If you make them seperate sprites you can make them spawn mrore randomly. Well that's my input, let me know how your game turns out, I'm a huge fan of zombie games (cod zombies)

It's possible, but it's easier to make lots of sprites.

When making it, remember that online or in Presentation Mode, the screen only refreshes at the end of loops, or during waits in loops. Stamping is then used to create multiple sprites. See this project for an example.


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&display=small

Offline

 

#5 2012-06-13 09:34:51

PencilFactory
Scratcher
Registered: 2011-11-11
Posts: 100+

Re: anyone know how to make an emitter?

when i receve [move]
clear
make list [x v]
make list [y v]
add (x of zombie 1) to [x v] and (y of zombie 1) to [y v]
add (x of zombie 2) to [x v] and (y of zombie 2) to [y v]
add (x of zombie 3) to [x v] and (y of zombie 3) to [y v]
…
set [i v] to (0)
repeat (# o zombies)
change I by (1)
if <(i) > (# o zombies)>
set [i v] to (1)
end
go to (item (i) of [x v]), (item (i) of [y v])
stamp
replace item (i) of [x v] with (x position)
replace item (i) of [y v] with (y position)

end
see this as an example
say [[url=http://scratch.mit.edu/projects/eRKSToCK/1777260]this[/url]]

Last edited by PencilFactory (2012-06-13 09:39:22)


PencilFactory is http://blocks.scratchr.org/API.php?user=PencilFactory&amp;action=onlineStatus&amp;type=text, see my computerhttp://mag.racked.eu/cimage/i9002/Achievement+get%21/Computer+crashed/mca.png

Offline

 

#6 2012-06-13 09:42:17

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: anyone know how to make an emitter?

PencilFactory wrote:

when i receive [move v]
clear
add (x of zombie 1) to [x v]
add (y of zombie 1) to [y v]
add (x of zombie 2) to [x v]
add (y of zombie 2) to [y v]
add (x of zombie 3) to [x v]
add (y of zombie 3) to [y v]
…
set [i v] to [0]
repeat (# o zombies)
 change [i v] by (1)
 if <(i) > (# o zombies)>
  set [i v] to [1]
 end
 go to x: (item (i) of [x v]) y: (item (i) of [y v])
 stamp
 replace item (i) of [x v] with (x position)
 replace item (i) of [y v] with (y position)
end

Fixed [your v] (scripts)

Last edited by SciTecCf (2012-06-13 09:43:04)


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&amp;display=small

Offline

 

#7 2012-06-13 15:15:26

nathanh123
Scratcher
Registered: 2012-02-17
Posts: 11

Re: anyone know how to make an emitter?

Thanks so much, great help  smile

Offline

 

#8 2012-06-14 04:46:17

jontmy00
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: anyone know how to make an emitter?

It would be easier with cloning in 2.0.


FOR ALL THE NEWS ON UPDATES FOR SIMPLISTICRAFT, CLICK HERE.

Offline

 

Board footer