super newbie question.
im trying to make this water fountain, where i have drops of water being shot into the air at random angles, that then should fall to the ground.
i can spawn the drops just fine, but i cant seem to figure out how to make gravity affect them, so they dont just keep flying upwards.
can anyone help ?
Well, it depends on what system you're using. When I do particle effects, I always set the particles' X and Y values to their current X and Y values plus their A and B alterable value, respectively. So I could just subtract from the B value and it would continue to fall.
For example:
Always: Create particle at 0,0; Set Value A to random(5) - 3; Set Value B to random(5) - 3; Set X position to X position plus Value A; Set Y position to Y Position plus Value B.
Every little while: Subtract 1 from Value B.
You'd need to mess with the values a bit to get it to work right, I don't have a working system right in front of me to check, but the gist is there.
Alternatively, if you're shooting them out with bouncing ball movements, you can use the direction calculator extension or an equivalent and have the particle slowly rotate toward the down direction. That's not proper looking though so you might want to go with the first system.
i have blood in my game which does basically the same thing, except bloodier (blooder than water!? OMG!)
but i use vector movement to do this, set the gravity direction to whatever down is, like 270 or something, then just have some kind of timed trigger thing (mine is actually in a movement loop, but you shouldnt need a loop for it), and every time that event comes, create a drop of water, use the clickteam movement controller to select that drop of water, then using the CMC, set the angle to 135-Random(45). i aslo put in a set x to (x-6)+random(12) to set a random position aswell, but for a fountain that might be redundant. then of cource you need the drops to dissapear so you need an event that states if an alterable value of the drop called transparancy of the drop is greater or equal to 0, then set the semi-trans of the drop + whatever, and set transparancy + the same ammount, then finish with an event that when the transparancy value is greater than or equal to 128, then destroy the drop of water.
What OldManClayton has said works quite well, although i personally use four values, and rename them as X speed, Y speed X accel, Y accel, you add X accel to X speed, and X speed to X position, essentially modelling a simple newtownian physics system. If you mess around with delays you can fine tune that really wellw and this system is quite usable for custom movement systems of all kinds.