visible
Returns: Boolean
An instance can be flagged as visible or not by setting this
variable to true (visible) or false (invisible).
This works by telling GameMaker: Studio to skip the draw
event for this instance, so care must be taken when using this as
it means that no code placed in the draw event will be run while
the instance is not visible.
if other.visible = true
{
x = xprevious;
y = yprevious;
}
The above code will check the visible flag of the "other" instance in a collision and if it is set to true move that instance back to its previous position.