ID:175402
 
im trying to mix cloak and uncloak in one verb. Here is what i have:
mob
var/invis
verb
ghostform()
set category = "GM verbs"
if(usr.invis == 1)
density = 1
usr.invis -= 1
usr.invisibility = 0
view() << "[src] appears!"
if(usr.invis == 0)
usr.invisibility = 1
density = 0
usr.invis += 1
usr.sight |= SEE_SELF
view() << "
[src] disappears!"

I see the problem that is in there, invis gets added and subtracted so nothing happens, but I don't know how to put it together.

Thanks,
~Aleis~
You can use else:
mob
var/invis
verb
ghostform()
set category = "GM verbs"
if(usr.invis == 1)
density = 1
usr.invis -= 1
usr.invisibility = 0
view() << "[src] appears!"
else
usr.invisibility = 1
density = 0
usr.invis += 1
usr.sight |= SEE_SELF
view() << "[src] disappears!"
In response to Jon88
do the indentations do something?

EDIT

nevermind, they were just screwed up, it works now.

Thanks,
~Aleis~