I have an object with a verb to pick it up. After it is picked up a timer begins to time the amount of time it takes the player to take this object from point a to point b. I have this all working, however, I need to be able to remove the object from the players sight after it is picked up. If I use the del() proc it halts the timer and nulls out all references to the object. Does anyone know of a way of accomplishing this? Also the Pick Up verb in the code below bis left in the comands panel after it's clicked. If you click it again it removes the verb this casues problems with the code as it allows the player to pick up 2 rocks and starts 2 timers.
I stripped the code down to this and I still get the same result.
Pick_Up()
set src in view(1)
del(src)
Leaves the verb even tho the src is deleted.
Here is the code I have been playing with:
/obj
blue_rock
icon = 'blue_rock.dmi'
verb
Pick_Up()
set src in view(1) //Must be close
usr << "Take this to the blue square"
usr.has_rock = 1 //Player has a rock
usr.dest = locate(3,16,1) //Rock Dest
//del(src)
//src.invisibility = 101 //Make Invis
StartTimer() //Time how long it takes
ID:178761
Apr 8 2002, 10:18 am
|
|
Usually get verbs will place the object in within usr.contents. Is there a reason you wish to avoid this? It would solve your problems.
change del(src) to Move(usr)