Author Topic: Check If Item Is Spawned On A Brick  (Read 675 times)

Is there a function to check if an item is spawned on something? I need to differentiate between Ctrl+W dropped items and brick-mounted ones.

Did you try packaging fxDTSBrick::setItem and ::spawnItem and attaching a variable stating it came from a brick, the variable being attached to according tool slots?
« Last Edit: July 20, 2013, 10:14:50 AM by Pacnet2012³ »

Did you try packaging fxDTSBrick::setItem and ::spawnItem and attaching a variable stating it came from a brick, the variable being attached to according tool slots?
Actually, how could I find out whether or not the item had a previous owner, on pickup? like I have the code for when it picks it up, but I don't know how to check who the previous owner was.

To answer your original question, you can tell if it was spawned on a brick by checking if %item.spawnBrick exists.

Actually, how could I find out whether or not the item had a previous owner, on pickup? like I have the code for when it picks it up, but I don't know how to check who the previous owner was.
Package the function where it's picked up and set %item.lastPickup = %pickupClient;

If nobody has picked it up yet, this variable is null (""), otherwise the last person to pick it up is stored.