Multiple object adding from 1 single object / Party poppers

hi everyone.

i would like to ask if there is a way to create an object that can spawn multiple objects and throw them into different directions (at the same time)? i kinda have an idea to build a party popper for my game…

when the player enters turbo mode. his score will start to be doubled and a BOOOM effect will appear with colorful paper pieces and strips… i hope you understand what i mean. Those elements will fly towards the character.

I dont want to use particle add on. since the game im making has so many scenes and i need that effect to work on every scene. the addon of andee is currently not able to run on many scenes .

i thank you in advance

Just have the confetti pieces on their own layer and use the addobject actuator to spawn them with velocity out of the popper’s aperture. If you want, i could create an example file. :slight_smile:

thanks TB Tech. yes please. hm am sorry i could not be able to open my pc coy i need to move to other place for studying. my pc is now packed… after about two days iwill sure look at it. could you maybe make few screen shots of its action ?

Will do :wink:

If you’re happy with python, it would be very easy to have an empty and then just spawn confetti objects and give them a random velocity.

It would be good practice to try and code this yourself, because what you have described, will be your first basic particle system coded from scratch :slight_smile:

Infact, if you look up ‘basic particle system’ on google im sure you could find a lot of useful info for what you want to do.

thanks cypher. i thought of that option too. hm i search that basic particle thingy now

Alright. here it is: party_popper.blend (622 KB)
Press the spacebar to activate it, hold it down to make it loop.
All programming was done via logic bricks. (If you use python instead, you can set the confetti to be fired off at a random angle each time.)
Spawning confetti is triggered by animation frame number.
The confetti has a translation constraint to make it fall like real confetti.

Screenshots:

{Idle}
http://i.imgur.com/GDpYltO.png

{FIRE!}
http://i.imgur.com/L3OGrnj.gif
If you are having any other trouble with this, please feel free to say so! :slight_smile:

thanks! it looks cute http://s2.postimage.org/p03x5tr8/yoyo08.gif. Still I would have it as a python version since there should be so many pieces being shot out there. I am trying not to use many logic bricks because i want to improve animation and timing calculation speed in my game. Can you somehow modify it into python?

Sure, ill give it a shot :3

Make it cute ^^ thunkssss

did you give it a shot o.o?

I did something like cypher2012 described (again oO) for a silly 1-hour game last month. Except I used force instead.

scene = other.scene
for i in range(0, 20):
    ob = scene.addObject('particle', other)
    ob.applyForce((random.randint(-1000, 1000), 0.0, random.randint(100, 5000)), True)

horse.blend (667 KB)

Sorry, school has been taking up a lot of time lately :frowning:
Im working on it now.

@pqftgs
thanks pdftgs, it looks cute ^^ i take a closer look now

@Terra_Byte_Tech
uki !

Got it! :smiley:
[GIF]

I marked comments in the python script detailing what it does.
You are able to change variable constraints for the random integers used for velocity and angle in the popper’s properties for ease of use (no need to open the python script to make changes to the constraints). :smiley:

[SUP] [SUP]I also took the liberty of adding in the Python goofy snake and some cheering since you asked for it to be cute. :3

[/SUP][/SUP]party_popper.blend (672 KB)

yes its very cute ^^ Thanks TBTech. Hehe i see you added a kid sound in it http://s2.postimage.org/p1e87jl0/yoyo31.gif

No problem, and yep. :3
Good luck on your game.