Most good games of gamemaker make your character move somehow. This quick post will tell you how to make your character move.
First what you need is an object. For this post I'll use the name obj_player for my object.
Now go to the obj_player's window.
click add event-key press-A
go to actions - move tab - speed horizontal
Under the key press events
<A> = horizontal speed -4
<D> = horizontal speed 4
Vertical speed
<S> = Vertical speed 4
<W> = Vertical speed -4
MAKE SURE NOT TO PRESS RELATIVE
Now we need to make the player stop when not pressing anything.
For this, we use the event key release.
Under the key release events:
<A & D> = horizontal speed 0
vertical speed
<S & W> = vertical speed 0
That's all you need to make a player move.
Happy Gaming!
No comments:
Post a Comment