|
This built in variable holds the objects y position (the vertical grid line) of where it started or was created in the room.
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;
|
cityscape - Revision #1
|