4
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
660 B

ScriptName defaultOnHitActivateLinkedRef extends Actor
{Default script that lives on an actor. On hit, activate the specified linkedref.}
import game
import debug
bool property doOnce = false auto
keyword property linkKeyword auto
{if this has a linkedRef with this keyword, we will activate it once when hit}
auto State waiting
Event onHit(objectReference akAggressor, Form akWeapon, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
(getLinkedRef(linkKeyword) as objectReference).activate(self)
if (doOnce)
GoToState("allDone")
EndIf
endEvent
endState
State allDone
;do nothing
endState