Game Development Reference
In-Depth Information
Before explaining the value, we need to know what the relative option does. The relative
option makes the action work relative to the object's current values. If the relative option
wasn't checked, this action would move our object to position -8 and 0, which is off to the
left of the screen at the very top. This is due to the values being set directly. However, be-
cause we have Relative checked, the object will be moved eight pixels to the left.
It is important to note the way the axes work in GameMaker. On the x axis, right is posit-
ive and left is negative. So the further right the object is, the higher its x value. The further
left the object is, the lower its x value. On the y axis, down is positive and up is negative.
So the lower the object is, the higher its y value; the higher the object is, the lower its y
value.
This is why we have entered -8 as our value for left as this will move our object left by
taking eight away from its x value.
Search WWH ::




Custom Search