GameMaker
Version 1.4.1749
1 –
Creating the ufo object.
·
Create
a ufo sprite and import the corresponding image from the resources folder.
·
Create
a ufo object with the sprite from above.
2 – Moving
right.
·
In
the ufo object, add a Keyboard event (<Right>).
·
In
the above event, add a Set Variable action (control tab)
o
Variable:
x
o
Value:
5
o
Check
relative
3 – Moving
left.
·
In
the ufo object, add a Keyboard event (<Left>).
·
In
the above event, add a Set Variable action (control tab)
o
Variable:
x
o
Value:
-5
o
Check
relative
4 – Moving
up.
·
In
the ufo object, add a Keyboard event (<Up>).
·
In
the above event, add a Set Variable action (control tab)
o
Variable:
y
o
Value:
-5
o
Check
relative
5 – Moving
down.
·
In
the ufo object, add a Keyboard event (<Down>).
·
In
the above event, add a Set Variable action (control tab)
o
Variable:
y
o
Value:
5
o
Check
relative
6 –
Creating the level.
·
Create
a room.
·
Add
a ufo object.
·
Optionally,
you can also add the background from the resources folder.
Save and
test the game. The ufo should now
move around with the arrow keys.
|