Which way do you want it to face when it’s wall sliding? The actions there are flipping towards the wall. If I get a chance I’ll look later and see if I can have a go at it. So states wise …how many have you got ?
With the object timer that you mentioned…can you show those events.
Thank you for the help.
Ideally I’d like the Player to face the wall when wall sliding, but turn and jump off the wall when the Player hits the jump key (spacebar). So he can jump off to the opposite direction. Basically, so you can ping pong up two walls near each other.
I’ve got a total of 14 states (event pages). Which are:
- StateInit (initiates event pages of the state at the beginning)
- FSM (Initialization state when level begins, disables default controls and puts the player in fall)
- Idle
- Jump
- Run
- RunShoot
- Walk
- Slide
- Shoot
- Fall
- Hit
- Death
- WallSlide
- Sneak
- Sneaking(probably should combine with Sneak)
- Box (player is inside a box)
Here’s what the object timer looked like:
I noticed that when performing multiple wall jumps on the same wall, after the initial wall jump all the jumps after it no longer pushes the player in an upward jump arch but just flat horizontal instant force (even with setting the negative Y axis). Like it’s not picking up the jump action or Y axis or something.
Does that event trigger wallslide on both sides?..try tinting the player or something to check. whats the ‘state’ variable do?
I struggle to digest other peoples code sometimes…I know how I would do it …but i need to advise you on your code.
That’s a lot of states …bit of a headache…when I get more time I’ll go though it and try some tests based on what you’re up to and what you want to happen!
So I set the flash the player tint of green when the variable of ‘isWallSliding’ is true, otherwise stop flashing. He flashes when he’s sliding on either wall and stops flashing when he is no longer colliding with the wall (though he does flash for a half second longer in the air).
Yeah there’s a bit too many states, I’ve considered trying to condense them down. Especially if conditions are the same across sheets then they’ll interfere. Plus there’s the level page itself, which does have UI and a few controls there for weapon selection. It’s a mess I know. I’d love to streamline it, I tried to streamline it before and this is where I ended up with because the amount of features I have going on at any given time.
Figured out the ‘RunShoot’ issue. Turns out it was something stupidly simple. The animation had the wrong playback rate set so it was playing 1 frame a second lol.
I also figured out the ‘quadruple jump’ issue. Basically the ‘allow player to jump again’ action for the Air jump condition was letting the player jump many more times. When I removed that, he only now double jumps.
So I still have some issues like:
- Flipping issue on the ‘WallSlide’ not facing away from the wall on a left wall.
- Weird Fall animation hitch while jumping (probably just need a different animation or not come out of jump)
- The issue with any additional wall jumps after the first not having any vertical arc (just flat horizontal instant force).
But it’s finally progressing thanks to your help!
Great…read the logic top to bottom for each state as when there’s lots of states the order of events is really important. I keep meaning to look at the flip issue but I’ve not had a chance and I’m away at the moment.
No worries I appreciate all the help you’ve given me so far. I’ll try looking over the states again and see if there’s something causing it. I don’t see any events now with the action of horizontal flip set for the Player. All the direction changes are now variable conditions.
PROGRESS — So I did some testing and what was happening on the flip issue is if I jump from one wall to an opposite wall. The flip doesn’t occur (happens on both right and left sides). So when I changed my testing to test just a left facing wall the flipping worked!
So the underlying issue is landing from a wall jump to another wall it breaks. Including the facing and the jump itself (mentioned above). It apparently doesn’t like when I jump from a wall to land to another wall and jump again. Kinda of important if I’m having wall jumping as a way to climb up vertically.