Compilation of Behavior Expressions
Hi everyone,
Is there a compilation of the expressions used to achieve common animations?
Example:
a jump?
a wobble?
a shake?
Creating the animation through a series of separate images via the "Animate" behavior is definitely a logical answer, but I was wondering if there's a mathematical way to do it in the creator itself. Will save my game a lot of space.
Is there a compilation of the expressions used to achieve common animations?
Example:
a jump?
a wobble?
a shake?
Creating the animation through a series of separate images via the "Animate" behavior is definitely a logical answer, but I was wondering if there's a mathematical way to do it in the creator itself. Will save my game a lot of space.
Best Answers
-
tatiang Posts: 11,949
Au contraire, you can certainly use math to create those effects. For example, a jump could be moving the actor up briefly and then down briefly using interpolate or other movement behaviors. If you Google wobble or shake and the word GameSalad, you will find other threads here that explain how to do that: http://www.google.com/search?client=safari&rls=en&q=shake+gamesalad&ie=UTF-8&oe=UTF-8New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
-
LumpApps Posts: 2,881
I am not sure what you try to achieve but I sometimes use the velocity of an actor to change frames. I am on my iPhone but I'll try to explain.
Number your animation images (frames) for example walk1.png walk2.png walk3.png walk4.png walk5.png
Constrain self.image to "walk"..(magnitude(self.velocityX,self.velocityY)*A)%5
A should be a number and is a tweaker for the fps.
Advantage of this method is that the animation is dependent on the actors speed. So when it moves slow the frame rate is slow, etc.
Another thing is that you can have a sound at the exact frame you want by doing a rule: when self.image is walk1 make sound. (ideal for footsteps for example).
Hope this make sence. I can make a demo next week if you like. -
gyroscope I am here.Posts: 6,598
@LudwigHeijden … I so love your demos!
I'll second that! =D>
make one for all of us! Please :-bdMH
PS @ronixus I did a small game file to show a wiggle; it's using behaviours and rules though, not expressions, but might be useful for you:
http://forums.gamesalad.com/discussion/47196""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Answers
make one for all of us! Please :-bd
@LudwigHeijden Wow, thanks! Definitely, I'll appreciate it.
I'm lovin the support! Thanks guys.
http://forums.gamesalad.com/discussion/47835/framerate-depending-on-velocity-video-and-template
Lump Apps and My Assets