I love the smell of UnrealEd crashing in the morning. – tarquin

UE2:LineOfSightTrigger (U2XMP)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
U2XMP Object >> Actor >> Triggers >> LineOfSightTrigger
Package: 
Engine
This class in other games:
UE2Runtime, UT2003, U2, UT2004

LineOfSightTrigger triggers its event when player looks at it from close enough ONLY WORKS IN SINGLE PLAYER (or for the local client on a listen server) You could implement a multiplayer version using a tick event and PlayerCanSeeMe(), but that would have more performance cost

Properties

Property group 'LineOfSightTrigger'

bEnabled

Type: bool


Default value: True

MaxViewAngle

Type: int

how directly a player must be looking at SeenActor center (in degrees)

Default value: 15

MaxViewDist

Type: float

maximum distance player can be from this trigger to trigger it

Default value: 3000.0

SeenActorTag

Type: name

tag of actor which triggers this trigger when seen

Internal variables

bTriggered

Type: bool


OldTickTime

Type: float


RequiredViewDir

Type: float

how directly player must be looking at SeenActor - 1.0 = straight on, 0.75 = barely on screen

SeenActor

Type: Actor


Default values

Property Value
bCollideActors False

Functions

Events

PlayerSeesMe

event PlayerSeesMe (PlayerController P)


PostBeginPlay

event PostBeginPlay ()

Overrides: Actor.PostBeginPlay


Other instance functions

Trigger

function Trigger (Actor Other, Pawn EventInstigator, optional name EventName)

Overrides: Actor.Trigger