How would I go about doing this? I was thinking of using with(obj_Door) then checking to see what the lowest var_Exit number is free then assigning it but I don't know how to do this.
Edited by Hello Darren, 04 March 2012 - 05:58 PM.
Posted 04 March 2012 - 02:56 PM
Edited by Hello Darren, 04 March 2012 - 05:58 PM.
Posted 04 March 2012 - 04:28 PM
var i; i=0;
with(obj_door){ var_Exit=i; i+=1; }i=0;
with(obj_door){ var_Exit=other.i; other.i+=1; } // where other does refer back to the object telling all the doors to do the code
Posted 04 March 2012 - 04:38 PM
Posted 04 March 2012 - 04:50 PM
var i;
i=0; // <- if you want doors in another room to start from a diffrent nr, then just change it here
with(obj_door){
var_Exit=i;
if global.unlocked[var_Exit] instance_destroy()
i+=1;
}after that I don't run the code again, so there is no problem that some other door take over the number ..Posted 04 March 2012 - 04:57 PM
Posted 04 March 2012 - 05:10 PM
global.count = 0
var_Exit=global.count; global.count+=1;
Posted 04 March 2012 - 05:58 PM
0 members, 0 guests, 0 anonymous users