ID:267009
 
How do i make a invisability verb so when you click it it says something to world and you disapear and when you click it again it says something to world and then you reapear???
mob/verb/TurnInvisible()//The main verb function
if(usr.invisibility == 1)//Checks if they're already invisible
usr << "You're already invisible!"
else//If the person isn't invisible
usr << "You turn invisible!"
view(usr)<<"[usr] turns invisible!"
usr.invisibility = 1//They can't be seen
usr.sight |= SEE_SELF //They can see themselves, but to everyone else they're invisible


mob/verb/NotInvisible()
if(usr.invisibility == 1)
usr.sight &= ~SEE_SELF // They slowly become visible
sleep(15)//waits a few seconds
usr.invisibility = 0 //They are not invisible anymore
else
usr << "You're not invisible!"







::DBHavenMaster::
In response to DBHavenMaster
even better:

mob/verb/Turn_Invisible()
invisibility = 1-invisibility
if(invisibility) src << "You turn invisible!
else src << "You reappear!"
In response to Garthor
And even better:
mob/verb/Invisibility()
invisibility = !invisibility
sight ^= SEE_SELF
src << "You [invisibility?"dis":"re"]appear."
In response to WizDragon
And how do i attach a density thing to it so when they are invisable they can go through walls?
In response to DBZAS_Vegeto
By changing their density. If you don't know how to change vars, then you should go back to the tutorials.