How can I make a actor shaking all the time or actor shake but only a few seconds?
Hello,
How can I make a actor shaking all the time or actor shake but only a few seconds?
thank you
How can I make a actor shaking all the time or actor shake but only a few seconds?
thank you
Comments
Now make another timer inside that one, set it to "every 0.1 seconds"
Now make a behavior inside the timer: "Change X position to: (X.Position + (random(-2,2))
The X position will then change to a position very close to itself very quickly. The change of the X attribute will be so subtle and fast it will seem as if it is vibrating, shivering or shaking. Doing the same for the Y position will make it shiver in both axis as well.
Here you go dondan89
A couple of different shakes, one on the left is the method RD mentioned - and the one on the right uses sine/cosine to shake stuff around, they both work and both can be run for as long or as briefly as you like by using a timer . . . . . one slight advantage the sine/cosine method has is that unlike randomly changing position by a small amount lots of time it will remain shaking in the same place, the randomly changing position by a small amount lots of time method will (if left to run long enough) end up somewhere different on the screen to where it stared . . . but that might actually be what you want !?
I bet there are a hundred other ways to shake stuff around.
Link: http://www.mediafire.com/?unm1oomgm145up3
...
Thank You RD, Tynan, tshirtbooth for all the help
thank you so much
Actually that's pretty cool, kinda' like RD's method but you keep returning the actors to their origin so you don't get the actor drifting over time, I quite like the quality, very cartoonish, might steal it for something I am doing !!
Though I am still wondering if it's possible to make it shake extra hard along with the x and y position manipulation without it warping to another point int he screen...