Particle Help
Hey guys I am having a bit of trouble with a particle effect. When self.touches = 1 a particle effect plays for 2 seconds. However when self.touches = 2 I need it to go away. The problem is when you hit the actor twice relatively fast, the particle is still there at self.touches = 2 and i need to ONLY be visible when self.touches=1......if its 2 then it needs to go bye bye lol. I've tried a few different approaches with no success so far and was wondering if anybody had any ideas.
Comments
Rule:
When self.Touches = 1 AND self.Touches != 2
execute particles.
End Rule
Hopefully this solves your problem. I don't use particles that much, but that's my guess.
- Alex
_________________________________________________________________________________
PDL Productions
Vertical/Horizontal Level Select Template
Mac Mini For SALE!!!
I am considering when self.touches=2 I will constrain X and Y positions for at least 2 seconds to ensure the particle effect runs its course. Not ideal, but I guess it will have to do. I just havent been able to find a way to cancel out the particle BEFORE two seconds passes, provided self.touches=2 within the 2 second frame.
So in your case I would make a self integer attribute.
Make the touch rule to change that attribute to change from 0 to self + 1
Then make the rule for the particles to active when self.attribute = 1
Run a timer in the same rule and make it change that self.attribute to self + 1 again
So after all is said and done, you should start a 0, first touch sets it to 1 and fires off the particles, then it automatically sets it to 2 after time and when you press the button again, it will get set to 3 and so on, not ever firing off the particles again.