How do you do it?
Today I spent almost an entire day trying to get the platformer behavior to move in Y as well.
And While I managed to get it almost running in native, the same code utterly fails in html5 mode for some reason.
Now I am not sure whether to file this as a bug or blame it entirely on my lack of knowledge.
The inconsistency of compile results in html5 and native is worrying though. All I really used was the platformer automatism.
Did you try the “Space Marine” example of the native platform (should work also on the web platform if you enable it later)?
An “8 movement” is really something that does not even need an automatism. You just have add forces to your object, launch animation, and use an action specifically designed to move away your character from obstacles.
Never do this again
These kind of hack mean that you’re using the wrong solution
I took a look at that Beyond Oasis game you mentioned. I think you can do that kind of movement like this:
Have a standard 8 direction movement, like you find already in the examples.
Have a jump animation for the character and do a suitable + and then - of y position over a sensible period of time, to make it look like a jump.
Have a variable on the character called ‘isjumping’ (or something like that). Set = 1 while the character is jumping. You can then have ground attacks check if(character.Variable(jumping) = 0) - Can attack else they can’t do ground attacks. Make sure to set it back to 0 when the character lands.
I’m not sure if this is how they do it, but I’m pretty sure it would work just fine.
I was thinking of doing it that way. Yesterday I found an example code to also do the physics of jumping up.
I have to also store the Y value of the character before the jump- for jumping sideways.
And code in a completely different platformer logic than the one that comes in the platformer automatism.
So far I got this to work in multimedia fusion without any premade automatisms there (hey its a better documented engine so it was easier) . Will try and see if i can get the same code to work in gamedevelop and then share the code if it does.