ID:154703
 
Look, I have and obj in the map and I want to move it to a list(not usr.contents) called usr.list1, I tried this way:

src.Move(usr.list1)

It doesn't work, see what happens:

runtime error: undefined proc or verb /list/Enter().
If it's a list you want to move the object into you must use a list operator. A full explanation of list operators can be found in the Byond Guide, chapter 10, section 4.1.

You can also do this:
objAA//your object.

src.list1+=objAA//adds the object to the list.
In response to Dariuc
It works, but the obj is still on the map, how can I destroy the obj in the map without destroying the obj in the list?
In response to Muvuca
So basically you want to move the whole object into your inventory "list" correct?
You'd still have to add it to your contents to do so I believe, which is the same as before except

Take_Weapon()//standard get procedure
set src in oview(0)
usr.contents += src
usr << "You add the [src.name]."


that code a verb would be on the object so that is accessible when someone is standing on it. If you wanted to increase it's range, increase the number of oview()
In response to Dariuc
This way the obj would still stay on the ground, is the same thing as before...

EDIT: What I'm saying is that this way you are creating a copy of the obj.
In response to Muvuca
If that's the case then you will have to move the object to the usr.contents, then add it to the list you want. I'm a bit confused why you are doing that though, even in usr.contents you can group items according to a classification that you give them, so that they show up in different windows.
In response to Dariuc
Because I have five lists plus usr.contents, but I think if I do what you said about moving to contents and then moving to another list would work. I'll try it.
In response to Muvuca
Or you could add the list to your character's contents. I'm not sure if that would work, but it's worth a try.
I do know that you could create an object like a "pouch" with a list attached to it. Then you could simply move the object to the pouch and have the pouch in the usr.contents. But it just seems kinda pointless since they are all going inside the usr anyway.

Also is this a multi-player game? Lists use up resources. One player with 6 lists attached to it isn't too bad. 50 players with 6 lists might well bog your game down considerably from what I understand. That's also something to consider.
Also once you move the item to the list, you can "remove" it by simply making it's locate null. obj.loc = null

Then it will no longer be on the map, however you can still reference it from that list.