Jump On Enemy For A Ride

  • Hey there guys! I'm really struggling with this and couldnt find any answer anywhere!

    What i wanna do:

    There is a player. There is an enemy. The enemy wont hurt the player. The player can walk by the enemy. The player is able to jump onto the enemy (behaviour:jump-through).

    Ok, so far no problem. The problem is, i wanna give the enemy a certain animation, lets call it "exhaust", if the player is on the enemys back. Now, i can do that too, but i can't accomplish the animation to go back to" idle" (default animation of the enemy) whenever the player jumps in the air, or jumps off the back of the enemy.

    I tried using event-group activating/deactivating, i tried to use a combination of overlapping and colliding combinations, variables and boolean but i couldnt find any good solution for this.

    It really shouldnt be that difficult, i just can't find any solution.

  • What are the event/conditions you use to get the enemy to play the animation?

    is it possible to use an else event?

    are there any variables chanched which should be set back?

  • First i tried, set a boolean (RideOnEnemy), to true, if the player is overlapping the enemy and falling at the same time. If player is not overlapping anymore it will be deactivated, and the animation will go back to "idle". But the overlapping didn't work out.

  • But the overlapping didn't work out.

    What didn't work out?

    To be more clear:

    What are the exact events you are using?

    What is happening right now in your game and what did you expect to happen?

    Providing a capx for us to look at would be very much appreciated, for it will make answering your question much easier..

  • Here my capx, it's just an example.

    Ok, here is what i wanna do:

    The Player (green box) passes by enemy (blue box) > nothing happens

    The Player (green box) jumps onto the enemy (blue box) > the enemy plays the blinking animation

    The Player (green box) standing on the back of the enemy (blue box) can move around > the enemy still plays the blinking animation

    The Player (green box) , still on the back of the enemy (blue box) can jump, but while in the air, the blinking animation of the enemy goes back to idle

    >as he lands back on the enemys back, it starts blinking again

    If the player jumps off the back, the enemy animation goes back to idle.

    filedropper.com/enemyride

  • Thank you LittleStain!

  • Is it possible to open the file in older version of construct2? Cause i get an error because the project was saved in the beta version.

  • You can either download the beta-version from the bottom of this page or follow these instructions:

    How to open newer versions of capx files

    unzip the capx and edit the caproj file in a text editor

    find where is says (for example)

    <saved-with-version>21100</saved-with-version>

    and replace with an older number eg

    <saved-with-version>17000</saved-with-version>

    save and try

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Great, thank you!

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