ID:272398
 
I have doubt on function "see_invisible." For example if I put a mob with the "invisibility = 25" and a mob B with "see_invisible = 25", the mob A could see the B?
Yes.

But next time, just test it for yourself. Don't waste people's time with such a simple question when you can easily find out for yourself.
In response to Foomer
Actually no.

Mob B could see Mob A. And mob A could see mob B if they had same invisibility/see_invisible vars.

From what he said it's impossible to figure out if mob A can see mob B
In response to Andre-g1
Andre-g1 wrote:
Actually no.

Okay, I read it backwards.


From what he said it's impossible to figure out if mob A can see mob B

No its not. Just make the player mob A and see if he can see mob B.

In response to Foomer
I tested but not satisfied:
 mob/proc/Comecar()
loop
var/a = rand(1,100)
for(var/mob/M in world)
if(M.invisibility == a)
goto loop
else
usr.invisibility = a
usr.see_invisible = a


I tried to make a mob become invisible but see only himself.
In response to Kakashi_157
No usr in procs, and you should use a mob's sight variable instead of it's see_invisible variable if you want it to always see itself.

mob/verb/See_Self()
usr.sight |= SEE_SELF //This turns on the SEE_SELF bit,
//meaning that the usr can always
//see themself no matter what.


In response to Kakashi_157
Make note that the goto statement should never be used to form a loop. (Use for() or while().)