CreateDetectionEvent - ObjectReference: Difference between revisions
Jump to navigation
Jump to search
DavidJCobb (talk | contribs) (Linking to the actual explanation for detection and detection events.) |
m (Convert source tags to syntaxhighlight) |
||
| Line 6: | Line 6: | ||
== Syntax == | == Syntax == | ||
< | <syntaxhighlight lang="papyrus"> | ||
Function CreateDetectionEvent(Actor akOwner, int aiSoundLevel = 0) native | Function CreateDetectionEvent(Actor akOwner, int aiSoundLevel = 0) native | ||
</ | </syntaxhighlight> | ||
== Parameters == | == Parameters == | ||
| Line 19: | Line 19: | ||
== Examples == | == Examples == | ||
< | <syntaxhighlight lang="papyrus"> | ||
; Creates a detection event for Bob at the tripwire location, 0 sound | ; Creates a detection event for Bob at the tripwire location, 0 sound | ||
TripwireProperty.CreateDetectionEvent(Bob) | TripwireProperty.CreateDetectionEvent(Bob) | ||
</ | </syntaxhighlight> | ||
<br/> | <br/> | ||
< | <syntaxhighlight lang="papyrus"> | ||
; Creates a detection event for Bob at the tripwire location, 100 sound | ; Creates a detection event for Bob at the tripwire location, 100 sound | ||
TripwireProperty.CreateDetectionEvent(Bob, 100) | TripwireProperty.CreateDetectionEvent(Bob, 100) | ||
</ | </syntaxhighlight> | ||
== See Also == | == See Also == | ||
*[[ObjectReference Script]] | *[[ObjectReference Script]] | ||
Latest revision as of 19:55, 5 September 2026
Member of: ObjectReference Script
Creates a detection event at this object's location.
Syntax[edit | edit source]
Function CreateDetectionEvent(Actor akOwner, int aiSoundLevel = 0) nativeParameters[edit | edit source]
- akOwner: The "owner" of the detection event
- aiSoundLevel: The sound level of the detection event (0 to 100). Values bigger than 100 are not used in vanilla scripts but they work.
- Default: 0
Return Value[edit | edit source]
None.
Examples[edit | edit source]
; Creates a detection event for Bob at the tripwire location, 0 sound
TripwireProperty.CreateDetectionEvent(Bob)
; Creates a detection event for Bob at the tripwire location, 100 sound
TripwireProperty.CreateDetectionEvent(Bob, 100)