Okay, so, I have an idiosyncratic way of handling things. Ignore the eccentricity of my methods, please; I have various reasons for doing it the way I am, but that’s hardly the topic of this … topic.
GDevelop’s top-down movement extension stops whenever you press up and down (or left and right) at the same time, which just doesn’t feel fluid enough, unlike in many games where pressing down while up is pressed turns off the up key until you release it. I guess I could work around with that using the extension, but I also like doing all the work myself, because then I have all my own variables, the functionalities of which I (in theory) fully understand, right there, easily accessible, and I guess I’ll look for any excuse to reinvent the wheel like that. Most importantly, perhaps, I’m actually learning how that stuff works as I’m implementing it, too.
So, my top-down movement has 4 different booleans. If you press the up key, the south trigger boolean shuts off and the north trigger boolean flips on, and if the up key isn’t pressed, the north trigger boolean shuts off without it effecting the south trigger. East and west are similar but not in any way connected. I used forces to facilitate the actual movement, which means that whenever north is true but east and west aren’t, the player first stops moving and then moves north, and whenever both east and north are true, the player first stops moving and then moves northeast. It’s actually kind of tedious, but it works. I tested it, and it is actually far superior to the top-down movement extension. Mainly due to the thing about opposing directions canceling each other out.
However, there is a bug, because any given directional trigger boolean can only be true as long as the player is in collision with a floor object. I think I might be a bit longwinded. Sorry. Bear with me. In short, the player has 4 points around it in each of the 4 cardinal directions and if the north one of those is off the floor, the player can no longer go north until it’s back on the floor. I used the “point is inside an object” condition to do this.
My problem is that whenever there is multiple instances of floor, for whatever reason, the event to stop the player when no keys are pressed fails to trigger, rather than what might be expected with the event just triggering constantly. How do I check if the point is inside at least one instance, instead of all of them at once?
(Note: For modularity, I’ve already put some of the settings you might like to have for gameplay into global variables, like keybinds and movement speed, because it’s just easier to do that earlier on, and because it makes the development and testing processes infinitely easier just to have those options as a developer. Thus the reason I actually don’t think I have any raw numbers in the event sheet. That being said, I can understand how that might be more confusing to read. Movement speed is 30, and the keybinds are just the normal arrow keys.)



