ID:2538349
 
Code:
            if(usr.Teleport == "Flame")
if(usr.Selforb)
view()<< "[usr] flames in!"
var/image/I=image(icon='magicgood.dmi',icon_state="Flame")
flick(I,usr)
usr.density = !usr.density
usr.invisibility = !usr.invisibility
usr.Selforb = 0
else
view()<< "[usr] flames out!"
var/image/I=image(icon='magicgood.dmi',icon_state="Flame")
flick(I,usr)
usr.density = !usr.density
usr.invisibility = !usr.invisibility
usr.Selforb = 1


Problem description:
Rushes through the Flame-in icon, not even executing the view() msg. For some reason flame out works fine though... icon is fine and it displays the view() msg. If anyone could help me out or point me in the right direction lmk, thank you ^^.
http://www.byond.com/docs/ref/#/proc/view
...takes into account the visual capabilities of usr, which might include such things as the ability to see in the dark or to see invisible objects.
The user of this is invisible (usr.invisibility), so they can't see themself, in other words, the output of that view() does not include the user, or any other users that are invisible.
To solve this, you can try to use hearers() or alter the arguments to view().
EDIT: You could also just move the usr.invisibility = !usr.invisibility line to the very top, above the view() line to make the icon show up.
hearers() is identical to viewers() innit?
In response to Ter13
Ter13 wrote:
hearers() is identical to viewers() innit?

viewers() would still take into account visibility, so wouldn't work in this case, where the invisibility var is being used
In response to Naokohiro
Naokohiro wrote:
Ter13 wrote:
hearers() is identical to viewers() innit?

viewers() would still take into account visibility, so wouldn't work in this case, where the invisibility var is being used

Huh... What do you know? hearers() is not actually identical to viewers(). Guess I've been reading that reference wrong the whole time.
so hearers() actually works amazingly thank you so much! Still having a problem with the icon though.. Only the "flame in" seems to be working. Should I try using something other than flick()?