Flying animation Conflict

I created a collision condition in which if the player collides with an item (a feather). the animation of the player changes to the animation of flying. The problem is that it is not changing. I disabled “IS MOVING” from the player and the animation worked. or it is already in conflict. what do i do to fix this?

in flying… i put:

Player in collision with feather <> Change animation…

Thank you so much guys.

1 Like

Hm. I’m struggling to understand your code. You could check your event order. It’s always top-down, and if it says, eg.:

  • Player.Variable(flying) == True: Play flying animation
  • PlayerHitBox is on floor: play idle animation.

Then the second event would override the first one. I’d also check if everything’s spelt correctly. Otherwise, I’d probably need more information (Since the event you’re asking about isn’t even visible.)


When PlayerHitbox collision with object(a feather).
Play “Fly” animation e add a force to move object to “Platform B”.

My problem is the “Fly Animation” dont work. the animation that “is moving” is played.“Moving animation” is in conflict with “Fly animation”.

The feather collision:

My player moves:

My player “walking” in air. dont fly"

Alright, I think I might get it. It’s probably due to the animation being overridden. Here’s what I might try.

PlayerHitBox is in collision with fly: Set animation to “Fly”; Move hitbox towards 800,0 with permanent force of 100 pixels; object variable isFlying set to True; set Y position of player to player.y-1 (In order for it not be considered “on the floor”)

Then at your playermoves part:
Hitbox is on floor:
…variable isFlying == True: Set variable isFlying to false
…not hitbox is moving: Set animation to “idle”
…hitbox is moving: Set animation to “running”
Player.variable(isFlying) == True: Set animation to “Fly”

1 Like

Thankssss man!!! that’s right?

sorry for the job. I’m new to gdevelop

It’s only right if it works in the preview.
Oh, and you don’t need two of the same condition, nor that “Set Animation of Player to Fly” under the two-condition event.
Also, make it say “Change the Y position of Player subtract by 1”, otherwise your character will go far up in the air.

I hope I helped. Good luck with your game.

thankssss!!! when i get home i test it. the project is on the home computer! Thanks a lot for the help.