ID:174943
Jul 3 2003, 1:34 am
|
|
...check for a certain obj in the world to edit its vars?
|
Copyright © 2024 BYOND Software.
All rights reserved.
for(var/obj/O in world)
if(possible_types.Find(O.type))
return
else
possible_types += O.type
var/obj_type = switch(input("Of what type of object to you want to change a var?","Change Vars")in possible_types|null
if(!obj_type)
return
else
//here you have to ask for what var to change
for(var/obj/O in world) //maybe this is used before and you can use for(O in world)
if(O.type == obj_type)
O.density = 1 //Is a example, just use O. and your var change after that
I never tested this code but it sould be something like this. This code btw wont change only one obj his vars but all the objects that are the same as you sellected.
Greetz Fint