Say I've got an actor, just a red dot, and when I hold down the spacebar I want it to "charge" the dot. Depending on how long I hold the spacebar, I want the dot to have a different initial velocity when I let go of the spacebar.
Like, I hold space for one second and let go and the dot moves forward at xvelocity = 2, but if I hold it for 4 seconds and let go, the dot moves forward at xvelocity = 8.
Also, in a somewhat related question, if I've got a variable in the scripting for one action, how do I transfer the value of that variable over to another script for a different action? I'm not very familiar with C, only Java.