So lets say the player is placing something on the map, how would i check to make sure the turf they are trying to occupy is currently not occupied by another object?
I guess the simplest way to explain what i mean is :
Lets say Building A - is currently set on Turf A.
Player A wants to build Building B on Turf B, but accidentally clicks Turf A - how would I go about preventing that object from being placed on Turf A, thus replacing Building A?
ID:154810
Dec 15 2011, 6:11 pm
|
|
In response to Robertbanks2
|
|
If you're just searching for the existence of an object, you can use the locate() proc instead.
if(locate(/atom/movable) in turf) |
This checks for any atom in turf's contents, and if it finds one, returns null, ending the proc before anything is placed.
You want to replace turf with whatever the target would be.