Hi gamers! Jumping is almost required in all arcade games right? And gamemaker is great for making arcade games! So i figured I should make a tutorial about jumping.(in steps)
1.)make two sprites the obj_guy & obj_land
2.) under obj_guy choose the create event: Set gravity
gravity : .5
direction : 270
2A.)the last action for this event is a variable: Set variable
variable: jump
value : 0
3.)the second event is "press (jump button)"
test variable:
if var jump is equal to 0
Start of block
set vertical speed to -10
Set var jump to 1
End of block
if var jump is equal to 1
Start of block
exit this event
end of block
should look like that.
4.) now the last event is collision with the obj_land
set vertical speed to 0
set var jump to 0
That's what you need to know about jumping. I'm sure thereare multiple other ways, but this is the easiest i've seen by far.
Hope you enjoyed this post and
Happy Gaming!
Which type of Game maker do you use?
Saturday, March 15, 2014
How To Shoot Toward The Mouse
Hello friendly game maker fellows! I was making a game a bit ago where you use w,a,s,d to move and the mouse to shoot. Then i thought "Hey, I should put a tutorial on how to shoot the mouse." And here I am.
Alright so the first thing you want to do is make 2 sprites, obj_guy & obj_bullet.
Now go to the obj_guy and select the event Global left pressed. (mouse->Global mouse->Global left pressed)
once you've done that go to execute code (under controls tab) Don't stop reading because there is coding it is at most 5 lines.
Type in:
with instance_create(x,y,obj_bullet)
{
speed=20
direction=point_direction(x, y, mouse_x, mouse_y)
}
This code is saying to create instance of obj_bullet with the speed of 20 and the direction is where mouse was clicked.
That's how to shoot toward the mouse.
Another thing you might want in to make your character look at the mouse. this requires coding but only 1 line.
So under obj_guy click the step event.
Then click execute code.
Type:
image_angle = point_direction(x,y,mouse_x,mouse_y);
This is telling gamemaker to make obj_guy follow the direction of the x and y of the mouse.
That's all you need required to make multiple other types of games.
Thanks for reading.
Happy Gaming!
Alright so the first thing you want to do is make 2 sprites, obj_guy & obj_bullet.
Now go to the obj_guy and select the event Global left pressed. (mouse->Global mouse->Global left pressed)
once you've done that go to execute code (under controls tab) Don't stop reading because there is coding it is at most 5 lines.
Type in:
with instance_create(x,y,obj_bullet)
{
speed=20
direction=point_direction(x, y, mouse_x, mouse_y)
}
This code is saying to create instance of obj_bullet with the speed of 20 and the direction is where mouse was clicked.
That's how to shoot toward the mouse.
Another thing you might want in to make your character look at the mouse. this requires coding but only 1 line.
So under obj_guy click the step event.
Then click execute code.
Type:
image_angle = point_direction(x,y,mouse_x,mouse_y);
This is telling gamemaker to make obj_guy follow the direction of the x and y of the mouse.
That's all you need required to make multiple other types of games.
Thanks for reading.
Happy Gaming!
Subscribe to:
Comments (Atom)