Editing
ProcessTrapHit - 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]] '''Member of:''' [[ObjectReference Script]] Tells this reference to handle getting hit by a trap, dealing the specified amount of damage and possibly applying a pushback force. == Syntax == <syntaxhighlight lang="papyrus"> Function ProcessTrapHit(ObjectReference akTrap, float afDamage, float afPushback, float afXVel, float afYVel, / float afZVel, float afXPos, float afYPos, float afZPos, int aeMaterial, float afStagger) native </syntaxhighlight> == Parameters == *akTrap: Which trap reference just hit this reference. *afDamage: How much damage to deal to this reference. *afPushback: How far back to push this reference. *afXVel: The impact vector's X coordinate. *afYVel: The impact vector's Y coordinate. *afZVel: The impact vector's Z coordinate. *afXPos: The impact point's X coordinate. *afYPos: The impact point's Y coordinate. *afZPos: The impact point's Z coordinate. *aeMaterial: Opaque integer value denoting what material the trap is. (Usually received via an [[OnTrapHit - ObjectReference|OnTrapHit]] event) *afStagger: How much to stagger the target, 0.0-1.0. == Return Value == None. == Examples == <syntaxhighlight lang="papyrus"> ; Process a trap hit on the player with just a little bit of damage, and no pushback or stagger, with a position ; velocity, and material from somewhere else (probably OnTrapHit) Game.GetPlayer().ProcessTrapHit(SpikeTrap, 1.0, 0.0, xvel, yvel, zvel, xpos, ypos, zpos, material, 0.0) </syntaxhighlight> == See Also == *[[ObjectReference Script]] *[[OnTrapHit - 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