Help! cannot change property of particle instanc

Discussion and feedback on Construct 2

Post » Sun Nov 18, 2012 10:42 pm

here is my setup, I need to randomize the color and rate of the particles, the colors are randomized but the rate never changes:

Create:
keyboard object
color1_particle object(type:oneshot resize:4x4 paint:red)
color2_particle object(type:oneshot resize:4x4 paint:green)
color3_particle object(type:oneshot resize:4x4 paint:blue)
color4_particle object(type:oneshot resize:4x4 paint:yellow)


family "particles" contains:
color1_particle
color2_particle
color3_particle
color4_particle

event: keyboard->On "T" pressed->
action:Create Object "particles"
action:particles->Set rate to floor(random(2,100))
B
4
Posts: 4
Reputation: 733

Post » Mon Nov 19, 2012 6:22 am

Try moving the random particles action to a System > Every Tick event, and the particle rates should vary over time.

Otherwise, you may simply not be able to tell with up to 100 particles being created every second. Try temporarily changing to random(2,10) and you should be able to see the difference more easily to see if it's working.

Help forum is here by the way:
https://www.scirra.com/forum/how-do-i_forum45_page1.html
B
9
S
2
G
3
Posts: 75
Reputation: 1,964

Post » Mon Nov 19, 2012 7:51 pm

Regardless of how I create the particle I am unable to set the instance properties.
I tested this by simply doing the following with no success:

Create:
keyboard object
color1 particle object(rate:0 type:oneshot resize:4x4 paint:red)
event: keyboard->On "T" pressed->
action:Create Object "color1"
action:color1->Set rate to 50

event: color1->On created->
action:color1->Set rate to 50

B
4
Posts: 4
Reputation: 733

Post » Tue Nov 20, 2012 7:49 pm

Can you share your .capx?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed Nov 21, 2012 1:27 am

Your wish is my command
https://docs.google.com/open?id=0Bz3I3hljpNFmdEhRME9HVG5rSnMbillym2012-11-21 01:29:41
B
4
Posts: 4
Reputation: 733

Post » Sun Nov 25, 2012 1:55 am

Is there any chance this is a defect with the object?
B
4
Posts: 4
Reputation: 733


Return to Construct 2 General

Who is online

Users browsing this forum: Colludium, Psychokiller1888 and 8 guests