mob/RPM
verb
Invisible()
set desc = "Turn Invisible"
set name = "(RPM Lvl 1) Invisible"
set category = "Staff"
if(usr.changed == 0)
var/image/I = image("Invisible.dmi", usr)
usr << I
usr.invisibility = 101
usr.density = 0
usr.changed = 1
usr.sight |= SEE_SELF
hearers() << "RPM [src.name] dissappears."
else
var/image/I = image("Invisible.dmi", usr)
usr << -I
usr.invisibility = 0
usr.density = 1
usr.changed = 0
usr.sight &= ~SEE_SELF
hearers() << "RPM [src.name] reveals themselves."
Problem description:
Trying to add 'invisible.dmi' which is just an icon saying invisible so that the usr knows when he has the verb on or not since his icon is still shown to himself. Any help is great, thanks! :)
Second, this line is incorrect:
You're attempting to send the player "-I" which doesn't really make sense. To get rid of the image in this case, I think your only option is to delete it.
If you don't mind other players who can see invisible mobs being able to see the tag as well, just use an overlay. Also, there's no need for the 'changed' variable as far as I can tell. Just test the invisibility var:
Finally, you don't need to put usr. before all those vars. Usr is the activator of the verb, whereas src is the object "containing" the verb. So, src would be fine here, and you only need to expicitly write src if there's another var with the same name. Usually, "var" is the same as "src.var"
You actually did this already, since you wrote "hearers()" with nothing before it. That equates to "src.hearers()," not "usr.hearers()".