ID:149945
 
i need an ownership code, like owning an object, and you only bieng the one to make the verb opporate, such as a door, i also need some code for changing density back and forth. or could i just use the flick()
Hgame9 wrote:
i need an ownership code, like owning an object, and you only bieng the one to make the verb opporate, such as a door, i also need some code for changing density back and forth. or could i just use the flick()

For ownership, all you have to do is set a var/mob/owner for the object and check during a verb to see if(owner==usr).

As for density, you do realize it's just a var, right? You can set it to 1 or 0. flick() is purely graphical, and would be more appropriate for things like door-opening animations.

Lummox JR
If the object to be owned can be held, it is usually reasonably safe to keep it in the owner's inventory.

For something outside, such as a door, you could make the object check for a unique characteristic of the person using the verb. (You could possibly check for the name or the key, but just make sure that it is unique whatever it is.) This would allow others to try the verb, but not let it actually do anything unless the correct person used it.

Density is a variable for atoms. To toggle it (or other boolean values) try using ^= 1.

Example: mob.density ^= 1

To my knowledge, flick() will not help.

PS: This thread deals with player-built houses. It might help... or confuse you further. One of those, anyway. :)

http://www.byond.com/forum/ forum.cgi?action=message_read&forum=code&message=9410&view=2