Trigger Fall Anim w/out using Platform Behavior

0 favourites
  • 5 posts
From the Asset Store
Create your own wss server and ws server with ssl and without ssl.
  • I am extremely stumped. Hopefully I can explain this in a way that is remotely understandable.

    I'm working on a Superhero game where you carry civilians to safety. A long time ago, I was having trouble figuring out how to attach the civilian to the player to make it look like they're being carried. Animmaniac was kind enough to help me out and showed me how to do it with UID's. It has worked great ever since.

    The problem I'm having is that when you release the civilian (which contains the Platform Behavior), they fall while playing the walk animation. There is no point where I can "trigger" the fall animation and if I set it to play "while falling" they whole thing goes crazy.

    I'm not quite sure how to get that falling animation to play.

    Line 64 is where the carrying of objects/NPC's is located. You can see my attempts to trigger the animations below with the "Civ" family.

    Any help is greatly appreciated.

    Arrow Keys to move.

    "F" key toggles flying

    "S" picks up and releases civilians

    "A" key while flying speeds you up

    Capx: Superhero Game: Falling Problems

  • Well 'on fall' does trigger when you drop him:

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/falling_anim_1.PNG" border="0" />

    you just need to make sure the moving animation doesn't override the falling one:

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/falling_anim_2.PNG" border="0" />

  • Thanks That helped, but it will still occasionally fail to trigger the falling animation. Right now I have an animation called "Left" that is used whenever the player is holding something. Its basically a drawing of the Player character's head and arms holding whatever object was picked up. Sometimes when I hit "S", that piece of art will just fall instead of switching to the fall animation. Any help is appreciated.

  • Yeah I see if you drop him and catch and then drop him again, 'on fall' doesn't trigger.

    I moved the 'set animation' to below the 'on s key pressed' but that didn't work for some reason. I think because the events below (that set the platform behavour enabled/disabled) were running every tick.

    So I rearranged the events in the 'Carry objects' group. I moved the actions that only need to run once when you pickup or drop a civilian under the keypress event. The only action that needs to be running every tick is the 'set position'. It seems to be working better now - what do you think?

    *edit* forgot the capx **

    civilian_falling.capx (r137)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • ramones That is working perfectly! I really need to study it to understand what you did, but its fixed all of the problems. Thanks for taking the time to figure this out.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)