Difference between revisions of "Talk:Event Handling"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>JT
(nope, I was wrong!)
imported>JT
(→‎OnReset: new section)
 
Line 8: Line 8:


--[[User:JT|JT]] ([[User talk:JT|talk]]) 19:21, 10 April 2015 (EDT)
--[[User:JT|JT]] ([[User talk:JT|talk]]) 19:21, 10 April 2015 (EDT)
== OnReset ==
(Hey, a year later and I'm finagling event handlers again!) The OnReset event handler does not behave as advertised -- it requires ''two'' ref parameters, both of which are filled with the same reference. --[[User:JT|JT]] ([[User talk:JT|talk]]) 21:38, 20 April 2016 (EDT)

Latest revision as of 20:38, 20 April 2016

OnHit & OnHitWith[edit source]

An OnHit event handler with no filter will trigger when any object is struck by an attack or projectile, assigning the first parameter to any physical object including statics, activators, misc items, doors, containers, etc. However, unless an actor was struck, the second parameter (the attacker) will be a projectile if using a ranged attack. The second parameter will still correctly be an actor if using a melee weapon.

OnHitWith is somewhat more useful in that it will always trigger for any object, and will always provide the second parameter for the weapon used by the attacker. However, it will still not yield which actor was the attacker, merely the weapon they are using.

There is thus no way to determine who caused an impact against an object with a ranged weapon, although it is entirely possible to determine who caused an impact against a person or creature.

--JT (talk) 19:21, 10 April 2015 (EDT)

OnReset[edit source]

(Hey, a year later and I'm finagling event handlers again!) The OnReset event handler does not behave as advertised -- it requires two ref parameters, both of which are filled with the same reference. --JT (talk) 21:38, 20 April 2016 (EDT)