Downloaded a new update of Gdevelop and saw that the problem regarding moving platforms going up and down and character not behaving properly, was fixed. Tried to add it to my game but I’m still experiencing the character constantly switching from falling sprite to idle sprite when the platform is going upward.
Is there something that I’m maybe missing in my condition and action codes?
Any help is greatly appreciated
I don’t see any problem in my platforms, yet I use a tween behavior.
I was kinda lazy and did a generic code for the bases. They have two variables Direccion taking values of 1 and -1, and type, with values of 1 or 2 (3 is buggy).
When they touch a limit, the variable Direccion is multiply by -1 (switching its value) and then a tween is added to the base, moving it according to the Direccion value.
I hope it helps
Huh. I didn’t get any new updates.
5.0.122-beta1 posted 4 days ago
So in order to get it to work i have to use tween function, instead of action: add an instant force?
A work around, in the meantime, could be to use a timer, so the fall animation is a bit delayed, for enough time so the “bumping” of the platform doesn’t triggers the change.
Something like this:
On a further test, for the speed of 80 p/s, a time of .14 seconds is enough so there is no flickering, even in the spot/direction change of the platform.
I hope this helps
Thanks for helping out
I tried with the falling condition and timer, but I still get the rapid switching of sprites between falling and standing. Also tried using gravity changing on the character. And also tried instant force upward for the character when on platform. I really dont get it why it doesnt work? Any other suggestions?
(Havent fiddled around with tween behavior like oscuridad666 suggested. I will take a lot at that and maybe figure something out)
Mind to show the events where you change the player’s animation? It is possible something is triggering in the wrong time.
Thanks for all help!!!
This thing is driving me nuts!
Your events could potentially conflict in a few ways. At the bare minimum, you want to ensure that any animation change event has 'trigger once", otherwise it’ll try to reset the animation every frame that the conditions are true.
However, I also cannot reproduce your issue in the test release with the new platform character behavior. Just to confirm, are you sure you’re using Release 5.0.122-beta1 · 4ian/GDevelop · GitHub ? It’s not available in the auto-updater and you’d have to manually download it.
Are you using 2 characters at once? I see two players (Player and Player1) in this set of movements.
I don’t see the delay code I suggest before too. Not sure if you tried it, and since it did work, you deleted it.
Not sure why I didnt use trigger once on the different character movements. This was in the early stage of when I started to learn Gdevelop, and I havent had any problems with it so it didnt crossed my mind
As for the second character, its just a square as the same size as the main character to show the different emotions when something happens.
I also tried with the delay as you suggested but still the same result.
But I think I found the problem. I only had 15 min of sparetime last night so will have a closer look when I have the time.
The falling condition of the character was the one that caused it all. I changed it to:
Condition: Character is falling and if the falling speed is greater than 400.
Action: Change the animation to falling.
Result: No bumping of the character and freely to move around on the platform when its going up. Also the character switches to falling animation if its falling
Thanks for helping me out here!!!
Correction on Condition for the character falling.
Played around with the falling speed but for the best result without getting the bumping when platform is going up, one can set the falling speed to 150.