mob
verb
PlayCard(obj/Cards/C in usr.trunk)
if(istype(C,/obj/Cards/))
C = new /obj/Cards/Test(locate(usr.x-2,usr.y+1,usr.z))
trunk.Remove(C)
Problem description:
The card doesn't get removed from the list Trunk when played.
ID:263410
Dec 13 2006, 3:46 pm
|
|
Code:
mob Problem description: The card doesn't get removed from the list Trunk when played. |
In response to Lummox JR
|
|
obj The card gets added to the list when you pick it up. I just can't get it to leave when I play it. |
In response to Lummox JR
|
|
Lummox JR wrote:
Dead_Demon wrote: > > mob Problem description: The problem is you're redifining C right after verifying it's a card. So instead of removing the initial C you defined in the PlayCard verb, you're trying to delete the brand new C you just created. Just dropping the "C =" like so should work. Also, I changed it to my preferred method of list removal. |
How could it be? You only just created the card; it's not in the list.
Lummox JR