Visible

Check if a specified object is visible, and if the entity is currently facing it

Note

This function does not rely on Senses function.

Syntax

Visible:[object] -- Returns if the specified object is visible and currently facing towards it, or not


// Make sure we are able to see
Senses true

// If we can fire our weapon and we can see the targeted object...
IfAttr "Timer:tCanFire == 0 and Visible:target == 1 Block begin"
    // Try to shoot at the target, say we're shooting, and reset our fire timer
    ExecutePattern st_combat_logic.xpt_TryShoot
    ExecutePattern .xpt_SayShoot
    ExecutePattern .xpt_SetFireTimer
Block end