Friday, September 5, 2014

The Mystery of the Turn Animations for 8 Way Movement (Construct 2)

Oh how it boggles the mind.  My mind is all a boggle.  I started off really proud of myself because I fixed a problem I was having in Construct 2.  Turns out the stopping animations from yesterday's post work great unless you start moving again mid-animation.  The game really didn't like that.  So I spent a half hour over thinking the whole thing and making a mess of my code.  Stepped back for a moment and the solution was right in front of me.  Just change the Animation State back to "Start" and trigger the animation again.  Pretty Easy.

In the middle of my "over thinking" phase, I contemplated triggering a turn animation to break up the stopping and starting.  That got me thinking about how I really haven't solved that problem yet.  I think I can get away without a turn in the slower flight animations, but the fast flight animations will be more obvious with the body flattened out and constantly turning.

Its probably going to need to be done with a bunch of conditions and some way of overriding the existing movement based angle animation.  That, and will I have to account for the time it takes to press the buttons.  If you are holding the left arrow and then press the right arrow to change direction, wouldn't there be a moment inbetween where neither keys are down.  Hmmmmmm.

Looks like I need to go to the forum.  More soon.

EDIT: Putting this here so I don't forget.

Shanon White (CaptainZeroGame on Twitter) suggested I make a variable for the last direction my player was going.  Then I will just compare that with my current direction.  If its East and West, play animation.  I'll have to trigger it in the spots where the movement angle is changing my abbreviation for the movement.  This probably doesn't make sense, so I'll put a bit of code up if I get it working.

Thursday, September 4, 2014

Flying Animation States Working in Construct 2!

Holy crap it works!  I mean....(darting eyes)....I knew it would work.

The animations aren't all in, but it works.  And that is a huge victory.  So the way it works is when you begin to move the state is "Start".  When any of the "start" animations end, it changes the Animation State to "Loop".  The loop animations will play for any flying angle until you stop moving.  Actually, its triggered by none of the arrow keys being down while a loop animation is playing.  Then it changes the Animation State to "Stop".  When any of the stop animations end, it changes the state to "idle".  That puts you back to square one.

You can test it out at the link below.  Full animations are for left and right.  But if you start flying at left or right and then fly around, you'll see the animations all loop until you stop while going left or right.  Hopefully that makes sense.  Press F to trigger flying.  Arrow keys move.

Check it out here: Superhero Build 9-4-14

Wednesday, September 3, 2014

So Many Animations

Oof, this is getting complicated.  But not TOOOOO complicated.  At least that's what I keep telling myself.  I'm knee deep in my implementation of the new animation system and its actually working.  At least so far.

During flight, I have the animation starting at the "Start" animation and then transitioning to the "loop" animations.  It will stay on the "loop" animations until the player stops.  Then it will begin again with the "start" animations.

I ran into a couple problems at first.  1) 8-way movement doesn't have a "on moved" trigger.  It just has "is moving".  The problem with that is that is just constantly repeating.  I need it to know that after one of the starting animations played, the animation condition goes from "Start" to "Loop".  Luckily, they have a "trigger once" event that I threw into a sub event.  Worked like a charm.

2) I'm dumb and had my syntax wrong.  I mentioned in a previous post the names of each flying animation is just the combination of 4 different variables.  I was using the + sign to combine those instead of the "&" sign.  Simple enough when I researched the original tutorial I found on picking animations that way.

Next up is triggering the stopping animations and then animating all of the remaining starting and stopping animations.  I hate myself more and more for including that cape.

Till next time,


Monday, September 1, 2014

Animation Naming Conventions

Oh boy.  Looks like this new animation system is going to be complicated.  I originally thought that you could direct Construct 2 to look into specific folders for the animations I would need.  I was then going to name the folders after different variables I would be triggering.  Well, the folder thing is wrong.  In fact, as far as I can tell, the folder is just to help you keep track of your animations better.

So, "what's the solution?" you may be asking.  Well, variables thing will work, but they will have to be in the actual animation name.  So now, the animation for flying north without holding anything is "FlyEmptyLoopN".  Looks kind of lengthy, right?  The new breakdown is like this:

Ground/Fly/Fast + Empty/Civ/LiftSm/LiftLg + Start/Loop/Stop +    Direction
      "Flight"                   "Holding"          "Animation State" "Direction"

So, Yes, it is complicated.  But I have to keep telling myself that I only have to set this up once.  Once these states are in place, it should account for being able to hold all civilians and objects (heavy and light).  I think I have the whole thing worked out.  I might work on the lifting of objects first as apposed to before when I put a civilian in first.  We'll have to see.

Till next time,


Friday, August 29, 2014

Slow Flying Angles Loops Completed!

If that headline doesn't make sense, Don't Worry!  Basically, the player is going to have a regular flight and a fast flight.  Both move the same but flash has the player stretched out.  The slower one keeps the player in the standing position while flying in different angles.  Now, each angle of animation will have a starting animation (cape begins to lift off and body starts to take posture), Looping animation (cape flaps in a loop and player is in flying position), and Stop Animation (Player slows and returns to the idle flying animation).

Right now, I have the Looping animations for the slower flight all setup.  Still plenty to go, but a good first step.  Above is one frame.

Till next time,


Monday, August 25, 2014


An upcoming Jack Kirby themed promotion at Carol and John's Comics got me into a Darkseid drawing mood on Sunday.  Not sure if it will end up being used, but I had a good time working on it anyways.  Sketch and inks in Manga Studio.  Colors in Photoshop.


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,