ID:268874
 
hi, im trying to make a system where when usr attacks the monster when the monster dies he drops an item now that item apearrs on the ground and usr can pick it up but say theres other people around that want to pick it up i want to make it so they cant pick it up for 5 secondes after the item was droped in that 5 secondes if the ytry to get it i want it to say you cant get this item because theres a hidden barrier or something like that any help would be great



Dave


P.S PC fried so i will be checking back every so often from Libareys PC thanks Happy Holidays
density=1
sleep(50)
density=0

?

Or if it's in an attack proc, make it remember the attacker and use it in an Enter() proc.
mob
Enemy
proc
Death(src,mob/Attacker)
Attacker << "You slay [src]"
var/obj/key/A = new /obj/key(src.x,src.y,src.z)
A.owner = "Attacker.key"
A.timep = 1
sleep(50)
A.owner = ""
A.timep = 0

obj
var
owner
timep
key
verb
PickUp()
if(src.owner == usr.key)
usr << "You picked up the key"
else
if(timep)
usr << "Sorry this is [src.owner]'s key"
else
usr << "You picked up the key"


This is completly untested..and there is a chance it might not work. In theory it should...but you might need to switch some vars around.

In response to N1ghtW1ng
N1ghtW1ng, you made a small mistake..

A.Owner = "Attacker.key"

should be..

A.Owner = "[Attacker.key]"


:P
In response to Lenox
meh, wasn't paying attention and I didn't run it through the compiler, i'm not sure if that is the only error though.
In response to N1ghtW1ng
It all looks good besides that. I was only looking through and saw that.
In response to Lenox
thanks guys you helped me figure it out thanks alot






Dave, Happy Holidays
In response to N1ghtW1ng
uh sorry to bring this back from the past but i was wondering my char has to be on top of the object o nthe ground to pick it up so, IF i could make the obj denisty 1 for the person its not ment for and density 0 for the person who killed the monster how would i do that
In response to Dranzer_Solo
Dranzer_Solo wrote:
uh sorry to bring this back from the past but i was wondering my char has to be on top of the object o nthe ground to pick it up so, IF i could make the obj denisty 1 for the person its not ment for and density 0 for the person who killed the monster how would i do that

Density is either one value or it's another. If you want something selective based on who might be trying to pick it up, just put the necessary checking into your Get() verb.

Lummox JR