Editing
OnTrigger - ObjectReference
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
[[Category:Scripting]] [[Category:Papyrus]] [[Category:Events]] '''Member of:''' [[ObjectReference Script]] Event called when the object reference is a trigger and has been triggered. This event will be sent every so often while a reference stays inside the trigger box (approximately two times a second). == Syntax == <syntaxhighlight lang="papyrus"> Event OnTrigger(ObjectReference akActionRef) </syntaxhighlight> == Parameters == *akActionRef: The [[ObjectReference Script (Papyrus)|ObjectReference]] that triggered this reference. == Examples == <syntaxhighlight lang="papyrus"> Event OnTrigger(ObjectReference akActionRef) Debug.Trace(akActionRef + " just hit us!") EndEvent </syntaxhighlight> == Notes == * This event is sent repeatedly, so care should be taken not to tie up the script system unnecessarily with a long complicated handler. Try using the trigger enter and leave events instead. * The rate at which this event is sent is controlled by the <code>[Havok]fTriggerEventDelayMS</code> INI setting, which defaults to 500.0. On Windows, the game measures how many milliseconds have passed since a trigger last sent a batch of OnTrigger events using the <code>QueryPerformanceCounter</code> Win32 API. * OnTrigger events are sent all at once for all refs (whose collision layers match that of the trigger) within the trigger's volume. == See Also == *[[ObjectReference Script]] *[[OnTriggerEnter - ObjectReference]] *[[OnTriggerLeave - ObjectReference]]
Summary:
Please note that all contributions to the CreationKit Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
CreationKit:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Landing page
Tutorials
Game Systems
Editor Reference
Scripting Reference
Recent changes
Help
Tools
What links here
Related changes
Special pages
Page information
Page values