For a game I'm making, I'm looking to reset all of the objects (on a certain z level once the user enters a certain area. For testing purposes I've made it a verb.
obj
objects
var
norm_loc
verb
reset_objects()
for(var/obj/objects/O in ???)
src.loc = src.norm_loc
src.icon_state = "normal"
ID:179594
Nov 30 2001, 2:50 pm (Edited on Nov 30 2001, 3:15 pm)
|
|
In response to Richter
|
|
That doesn't help because the items aren't destroyed. I have code that resets all the objects in the world, but I only want them to reset for z level 2 while ignoring those on z level 1 and z level 3.
[EDIT] I think I just answered my own question... |
In response to Evilkevkev
|
|
Would this work?
reset_objects(zlevel) for(var/obj/objects/O in world) if(O.loc = locate(O.x,O.y,zlevel)) O.loc = O.norm_loc O.icon_state = "normal" else return 0 I can't test it because I'm still having trouble with including Deadron's PathFinding library. (See Code Problems) |
In response to Evilkevkev
|
|
Evilkevkev wrote:
Would this work? I'd put "if (O.z == zlevel)" here, but the rest looks fine. |
That shold help you