This is the entirety of the code I'm using. Why can't I pick up a spear? It vanishes from the map, but a second later, I get "My loc is".
obj
portable
verb/get()
set src in range(0)
loc = usr.contents
spawn(10) usr << "My loc is [loc]"
mob
icon = 'pilot.dmi'
obj/portable/spear
icon = 'spear.dmi'
ID:149313
May 26 2002, 1:38 pm
|
|
Gughunter wrote:
loc = usr.contents usr.contents isn't a valid loc; it's a list. You're looking for usr, which is a valid loc. :) =V I helped Guy with a code problem... Err, wait, no I didn't. Shadowdarke told me what to say. Oh well. I helped Guy with a code problem... |
In response to Vortezz
|
|
I use Move instead of those assignments UNLESS I fiddle with the Move procedure.
|
In response to Exadv1
|
|
Exadv1 wrote:
I use Move instead of those assignments UNLESS I fiddle with the Move procedure. When I add more complexity to the game, I'll probably want to do that too. In the meantime, loc = usr seems to work fine. Thanks, both of you who responded so promptly! |
try.
src.Move(usr)
Also do you actually check if it is in the mobs inventory?