Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Are you on a mac?  This seems to be related to keyboard input on Macs for some reason, and as I don't have a mac, there is no way for me to debug it.  And slope collision was never a promised feature of TrueState.

Ah. Sorry about slope confusion. I just saw the red slope objects in the resources.

I am on a Mac. I also can't figure out what is going. 

read_controls looks solid, state_ap_player_stand and state_ap_player_run and ap_move_player as well.

The weird thing is it is only run left and standard jump left. But the character will turn and move left if the down arrow/jump dash is used.

(1 edit)

I love this state machine! I did find two issues once I deleted the Top Down scripts and objects on the platformer.

"ai_vars=[0,AiState.stand,1,no_direction];" had to changed to "ai_vars=[0,AI.idle,1,no_direction];"

"ai_var[0] = 0;" had to be changed to "ai_vars[0] = 0;" for the AI to load. The AI character also cant turn left.

When I enabled "draw_text(x,y,string(dpad_dir));" on the Draw event for the Player the correct numbers appear for the directions (180, 0, 270, etc), but after moving or jumping it sets to -1. If I press left and down before jumping the character turn left before jumping but the number displayed when standing is also -1. Is the number being displayed the face_direction? If so that might be the problem.

The character will also move left after jumping (but not face left) if the left and down button are both pressed.

So -1 is the value of "no_direction".  So any held direction should be between 0-360, and if there is no held direction, I use -1.  If there are issues related to hitting multiple keys on the keyboard, make sure it isn't a keyboard ghosting issue (which is extremely common).  Any time 3+ keys are hit at the same time, there's a good chance only 2 of them are actually registering.