kageIN
icon = 'mansions.dmi'
icon_state = "kagedoor"
density = 1
opacity = 1
Enter()
if(usr.rank == "Hokage"||"Raikage"||"Mizukage"||"Kazekage"||"Tsuchikage")
return 1
usr << "You may pass."
else
usr << "You must be Kage level to enter."
Problem description: Whats wrong with this? It isnt supposed to let everyone in, but it does...
Enter() and it's family, including its' twice-removed cousin Bump(), do not automatically check for what you define in it's argument.
Wondering what I mean? Let's see an example:
Now, you would assume that this procs is called when a mob enter the turf's contents (location)? Wrong. If an object entered the turf, it would still call the Enter() despite you defining the argument as a mob.
Solution 1: Use SAFETY CHECKS (Murphy's Law people, remember about it!)!!! And use the argument of Enter() instead of usr.
As for why using usr is evil in Enter() and it's family is because the procedures are automatically called via atom/movable/Move(), not by anything directly from the player(s).
- GhostAnime
Edit: And see UP's post, I can't believe that I missed that little thing >_<
Edit2: That code looks suspiously like the kageIn turf of the old WOTS source code... or it could be just me <font size=1>Psh, yeah right</font> >_>