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 .
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.
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 ?
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}
{FIRE!}
If you are having any other trouble with this, please feel free to say so!
thanks! it looks cute . 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?
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)
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).
[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