Anti-extract object

Posted by Zeno on Sun 19 Sep 2004 12:50 AM — 6 posts, 14,923 views.

USA #0
I'm trying to find a way to modify the extract function so when a certain obj type is extracted, it slides out into the room. (The only way it can be extracted is by sac'ing a container/corpse with the obj in it)

But sac calls seperate_obj, which makes the obj in the room NULL.

Exactly how would I have the obj "slide" (as in, from container to room) out of the obj, to the room?
USA #1
You first would call separate_obj (which is actually removing the object from whatever grouping it may be in) then you call obj_from_obj then you call obj_to_room it put it back into the room.
USA #2
I tried that, and in_room turns out to be null. seperate_obj seems to make the room null.
USA #3
Did you call obj_to_room after separate_obj?
USA #4
Yeah, or else it would to_room multiple objs. I removed the code though, because it was crashing due to null room. I can't show it.
USA #5
I'm not sure I understand your problem. There are instances in the code of separate_obj followed by obj_to_room, so I'm not sure why yours isn't working.