Legacy GM [Need Help]Making instances

S

Sugor

Guest
How can whats the right way to do it... I wanted to run a script even the instance doesn't exist but the
name of the obj is in the script for example

Code:
case 0:
 room_goto(obj_player_stats.prev_room);
break;
but i want the player to go to the prev_room even the obj_player_stats doesn't exist in the room
 

YoSniper

Member
If you try to query an attribute of an object and no instance of that object type exists, you will get an error.

In order to go to the previous room, you don't even need an object. You can merely say:

Code:
room_goto(room_previous)
HOWEVER, if you try to do this in the first room, you might get an error because there is no room previous to the first room.
 
S

Sugor

Guest
If you try to query an attribute of an object and no instance of that object type exists, you will get an error.

In order to go to the previous room, you don't even need an object. You can merely say:

Code:
room_goto(room_previous)
HOWEVER, if you try to do this in the first room, you might get an error because there is no room previous to the first room.
Thank you!
 
Top