GM: xstart
From GMpedia.org Wiki
|
xstart | |
| Type: | variable |
| Globalism: | Local |
| Editable: | Yes |
- The correct title of this article is xstart. It appears incorrectly here because of technical restrictions.
The xstart variable is a local variable that contains the starting x position of an object in the room.
[edit] Example
//this code would be placed in the step event or collision with enemy //event because that would be when it needs to check if you health is //out if health < 1 then { x = xstart; y = ystart; health = 100; }
Note that this is not a read only variable, it can be changed:
//for a checkpoint xstart = checkpoint.x; ystart = checkpoint.y; x = xstart; y = ystart;
[edit] See Also
Content from Game Maker Knowledge Base, was used to expand this article. The content was contributed by cityscape.

