SphereCommunity
something like "canseelos" for hidden item - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: something like "canseelos" for hidden item (/Thread-something-like-canseelos-for-hidden-item)



something like "canseelos" for hidden item - Rizz - 09-30-2014 07:15 AM

[Image: info10.png]

The two clocks are hidden so for players "canseelos" == 0 everytime.
Is there a way to make canseelos usable with hidden items?

I mean, i need a way to check if a hidden items is behind a wall for not.


RE: something like "canseelos" for hidden item - Skul - 09-30-2014 07:20 AM

my guess would be to use 'foritems 3' and compare if the player can see it's <p>, example:
Code:
[function canseehidden]
local.uid=<uid> //assuming <uid> is the player
foritems 3
  if ( <attr> & attr_invis )
    if (<uid.<local.uid>.canseelos <p>>)
      local.return=1
    endif
  endif
endfor
return <dlocal.return>



RE: something like "canseelos" for hidden item - Extreme - 09-30-2014 07:38 AM

ATTR &=~ 080
LOCAL.CANSEE <SRC.CANSEELOS <UID>>
ATTR |= 080
IF <dLOCAL.CANSEE>
SRC.SYSMESSAGE I CAN SEE!!!
ELSE
SRC.SYSMESSAGE I CAN'T SEE!!!
ENDIF


RE: something like "canseelos" for hidden item - Rizz - 09-30-2014 07:44 AM

Thx skul! Is working super well Big Grin Big Grin