Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Anti-extract object

Anti-extract object

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Zeno   USA  (2,871 posts)  Bio
Date Sun 19 Sep 2004 12:50 AM (UTC)
Message
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?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Sun 19 Sep 2004 01:28 AM (UTC)
Message
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.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #2 on Sun 19 Sep 2004 02:02 AM (UTC)
Message
I tried that, and in_room turns out to be null. seperate_obj seems to make the room null.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #3 on Sun 19 Sep 2004 03:53 AM (UTC)
Message
Did you call obj_to_room after separate_obj?

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #4 on Sun 19 Sep 2004 04:24 AM (UTC)
Message
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.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #5 on Sun 19 Sep 2004 08:26 PM (UTC)
Message
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.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


13,709 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.