I’m working on a metroid game but I was wondering
When I don’t have the ability to become a ball, i simply crouch.
But when I have the ability, I can’t crouch, it directly goes into ball mode, how can I fix that ?
If you need screenshots, feel free to ask me
Yes, we’ll need screen shots of the events that place the player in crouch and in ball ‘mode’. We could guess what’s going on, but screens shots will be the quickest way.
Ok thanks for the answer !
Here are the events of the crouch :
And here are the events of the ball mode :
As far as I can see in my test, i go from ball to up (not passing by crouch too)
Think about what is happening. You are in the ball/morph position. You press up and it changes to crouch. In the next frame, the ‘up’ key will still pressed and the position is in crouch position, so it changes to standing animation.
You need to set a boolean variable to true to indicate that the animation has changed from ball/morph to crouch. When you check the up key while in crouch position, also check that this variable is false before changing from crouch to standing animation.
Additionally, if the ‘up’ key is released, set the aforementioned boolean variable to false.
Do likewise for the stand to crouch to morph/ball sequence.
Thanks for the reply, can you provide me an exemple ? I’m not sure i got it ^^
Is it possible ? Bc i’m really stuck rn xD
Here’s a more detailed explanation, it’s more useful for the community:
In each of these two events, add an action that sets the scene boolean variable
WasMorphed to true.
And to each of these two events add the condition that checks if the boolean scene variable
WasMorphed is false:
You’ll also have to add a new event that checks if the up key was released, with the action of setting the boolean scene variable
WasMorphed to false.
Do something similar for stand > crouch > morph; use another boolean scene variable
WasStanding, and set it to true in the actions of each of the events that handle when the down key is pressed and the anitmation is a standing one.
To the each of the following 2 events, add a condition to check if
WasStanding is false:
And finally add a new event with condition that the down key is released and action to set te boolean scene variable
WasStanding to false.
Hey, thanks for the reply ! Very helpfull !
HOWEVER (Can’t work first time lol) I still encounter a problem
Every things are working fine except when i want to go stand>crouch>morph
I just do stand>morph
I’ve set everything like you said.
Here are the Events of Crouch :
And here are the event of Morph :
Did I missed something ?
EDIT : Doing morph>crouch>stand works fine !
Ok I solved it !
When I added "Change Boolean Variable “WasStanding” = True; I forgot to add it in my idle to crouch animation !
Thanks you are so helpfull ! Hope this will help other ppl too !
Have a good day/night !