ID:2102106
 

mob
verb
intangible()
density = 0
if(usr.key="War Dragoon")


Problem description:Can't seem to get this to work. Pls help?

you should check if theyre an admin before you set their density to 0 also = is for setting a value while == is for checking
Ohhh okay, P.s Big fan of your games.
thnx :P
So I tried what you said, it said the if statement has no effect
mob
verb
intangible()
if(usr.key=="War Dragoon")
density = 0

Output: System.dm:15:warning: if: if statement has no effect
you want the density change to only happen if the if statements true so you would put it inside the if (tab the density)
mob
verb
intangible()
if(usr.key=="War Dragoon" density = 0)
I'm sorry for being frustrating haha, I don't really understand, I'm really new to coding e.e
mob/verb/intangiblity()
if(src.key == "War Dragoon")
src.density =! src.density
yea what he/she said but just set it to 0 in your case
That works.
In response to War Dragoon
I'm surprised nobody has addressed how horrible of an idea handling verbs this way is. If only admins are able to use them, then there's no reason why regular players should have them. These verbs should be under /mob/admin and you should have a list of admin keys. On Login(), check if the key of the user who logged in is in the admins list. If so, give them all admin verbs(or some, depending on whether or not you have different admin levels) with typesof()
I think he has bigger issues if he doesn't know how an if statement works