• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML Need help

River

Member
Hello everyone, I'm making a monster that can jump and move in 4 directions, every 3 * room speed it will automatically jump (towards the player), I searched on the internet and couldn't find the resource. any information on this, if anyone has any suggestions or tutorials that can help me. If this is a silly question, please forgive me and ignore it. I sincerely thank. I am using GMS 1.4
 

TsukaYuriko

☄️
Forum Staff
Moderator
Since you didn't specify which part you got stuck at, I'll suggest reading up on alarms first and foremost, as this is probably the most basic way of handling any timing-related thing in GM.
 

TailBit

Member
I would suggest giving your topics more descriptive titles, your 3 last ones have been almost identical..

You could look up state engines .. idle .. move .. jump ..

Idle could set a timer, when it runs out, choose to jump or move, if move check which direction you can move and choose one, if jump then find a free tile to move towards and maybe do some shadow trickery along the way.

state .. state_next .. when state is changed then I set a state_start, which I set to false the next step..

you could do those direction / location checks in your move / jump states in a state_start moment

For the jump position, lengthdir in a direction towards player with some random deviation to aim and jump length, can div the position found and check if it is free a few times till you find it .. or give up and return to idle/move
 
Top