ID:150877
 
Hi. Just need to ask a small newbie question. How do you remove an item from the user? I've tried
usr.contents -= /obj/items/whatever
and that doesnt work

so could someone please tell me quickly? Thanks.

Dracon
On 7/12/01 7:39 am Dracon wrote:
Hi. Just need to ask a small newbie question. How do you remove an item from the user? I've tried
usr.contents -= /obj/items/whatever
and that doesnt work

so could someone please tell me quickly? Thanks.

Dracon

The reason this doesn't work is that "/obj/items/whatever" doesn't refer to an actual object in the game (what is called an instance, but rather the nonexistent prototype of the object contained in the code.

What you need is a code that finds a particular instance of the object, then either deletes it or moves it to another location. I could be more specific, if you were more specific in exactly what you're trying to accomplish.
In response to LexyBitch
Yes. I want it so it deletes the selected item. Also, how would I have something locate to a new random x, random y, and random z?
In response to Dracon
On 7/12/01 8:35 am Dracon wrote:
Yes. I want it so it deletes the selected item. Also, how would I have something locate to a new random x, random y, and random z?

Read up on the locate() function.

And don't ask us to answer quickly, if you want any answer at all.

(I'm so ashamed that Lexy didn't ping you about this.)
In response to Deadron
On 7/12/01 11:19 am Deadron wrote:
On 7/12/01 8:35 am Dracon wrote:
Yes. I want it so it deletes the selected item. Also, how would I have something locate to a new random x, random y, and random z?

Read up on the locate() function.

And don't ask us to answer quickly, if you want any answer at all.

(I'm so ashamed that Lexy didn't ping you about this.)

But he didn't ask us to answer quickly, he instructed us to "tell him" quickly. I type at close to 200 words a minute... so whenever I "tell" anyone anything online, I always do it quickly. :)
In response to LexyBitch
But he didn't ask us to answer quickly, he instructed us to "tell him" quickly. I type at close to 200 words a minute... so whenever I "tell" anyone anything online, I always do it quickly. :)

Zoom?! I'm 60-70 WPM, and my friends are amazed at how fast I am...
In response to Spuzzum
On 7/12/01 2:59 pm Spuzzum wrote:
But he didn't ask us to answer quickly, he instructed us to "tell him" quickly. I type at close to 200 words a minute... so whenever I "tell" anyone anything online, I always do it quickly. :)

Zoom?! I'm 60-70 WPM, and my friends are amazed at how fast I am...

I don't know how fast I am these days, but throughout my career people I don't know have wandered into my office just to say "Man you type fast!"
In response to Deadron
simple answer... is...
src -- ...heh..there you go lol