ID:164859
Apr 5 2007, 8:18 am
|
|
i need to be able to find out what is containing the usr like if hes in something i need to be able to tell what that thing he is in is and i have no idea how id do that i was thinking maybe making a var called container then i set it as what he just got into when he gets into it but i figured there might be a better way any suggestions?
|
In response to GhostAnime
|
|
thanks i get what you mean and i do know about enter and exit ive just never really done anything to do with containers other then like making a bag. plus i understand my message was hard to understand im horrible with words it took me half an hour and 12 erasing it all and rewritting it to get it that way lol.
|
Fortunately for you, I do understand. loc is a variable which has the container of the item.. the common container for /mob in most game is /turf. If there was an /obj inside a mob's contents, the /obj's loc would be that /mob.
You may want to look in to container procedures like Enter() and Exit() but make sure you read about these procs first... one thing to remember: in movement procs (such as Enter()), NEVER EVER USE usr!!!
As usr is the last client.mob which did something to invoke a proc/verb, it (movement procs) will not be directly called by the mob thus usr may not be the person who (indirectly) triggered the procedure.. er someone mind explaining this part? >_>' [Edited: Ah, here's a good link: ID:536700]
- GhostAnime