Jump On Enemy For A Ride

Get help using Construct 2

Post » Sun Oct 18, 2015 9:01 am

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.
B
11
S
3
G
2
Posts: 76
Reputation: 1,891

Post » Sun Oct 18, 2015 9:12 am

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?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Oct 18, 2015 9:19 am

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.
B
11
S
3
G
2
Posts: 76
Reputation: 1,891

Post » Sun Oct 18, 2015 10:58 am

PulvererPeter wrote: 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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Oct 18, 2015 11:50 am

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.

http://www.filedropper.com/enemyride
B
11
S
3
G
2
Posts: 76
Reputation: 1,891

Post » Sun Oct 18, 2015 12:59 pm

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Oct 18, 2015 1:23 pm

Thank you LittleStain!
B
11
S
3
G
2
Posts: 76
Reputation: 1,891

Post » Tue Oct 20, 2015 10:42 am

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.
B
11
S
3
G
2
Posts: 76
Reputation: 1,891

Post » Tue Oct 20, 2015 11:17 am

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
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Oct 20, 2015 4:41 pm

Great, thank you!
B
11
S
3
G
2
Posts: 76
Reputation: 1,891


Return to How do I....?

Who is online

Users browsing this forum: vutankhoa2015 and 31 guests