Friday, August 22, 2014

8 Way Movement and Folders In Construct 2


Transition Sequence
I knew it was just a matter of time.  I've finally started revamping the animation system.  Its been hanging over my head long enough.  

Previously I was doing a very basic  "Press this and play this animation" system and it worked fine.  Problem is, there are going to be a few different variations of the same animation.  There will be a version when the player is "arms free", holding a civilian, lifting an object over his head, holding something heavy, etc.  These will have different animation triggered the same way.  

How do you do that and keep the whole thing straight?  Well, you use folders and Variables.  

Lets say I just had the animations Stand, Run, and Jump. Now lets say I have 3 conditions: ArmsFree, WithCiv, and WithHeavy.  I would set up folders with those condition names and put their version of Stand, Run, and Jump inside of each.  Then I would set up a Global Variable in Construct 2 named "Condition" that would house the name of that condition.  So, if you pick up a civilian, set the condition to "WithCiv".  Then, you would trigger your other animations normally but include the folder before.  So if Right Arrow is pressed set animation to Condition"Run" . I hope that makes some sense. 

If you need a better explanation, leave a comment and I'll go into better detail or write a tutorial.

See you later,

-Ben

No comments:

Post a Comment