OnHitWith
From GECK
Contents
Description
This block will run when the scripted target is hit by a weapon. If the parameter is left blank, a hit with any weapon will make it run.
This can also be used on Activators. However, Activators only recognize Ammo hits with this event.
Syntax
Begin OnHitWith WeaponID
Examples
begin OnHitWith ;makes the calling actor play an animation, like the targets at the beginning of Fallout 3 if isAnimPlaying == 0 PlayGroup Forward 1 endif end
begin OnHitWith WeapPowerFist ;removes caps when the calling actor is hit Player.Removeitem Caps001 10 end
Notes
- Form Lists may be passed as a parameter.
- Runs AFTER the damage from the hit has been dealt. NVSE's OnHitWith event handler runs BEFORE the damage is dealt.
- Does not work when attached to a Weapon.
See Also
- OnHit
- SetOnHitEventHandler
- This blocktype is available as an NVSE Event Handler, although it behaves a little differently.