Enderal SE
https://mod.pub/enderal-se/38-enderal-se
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.
22 lines
669 B
22 lines
669 B
ScriptName defaultOnHitSetAV extends Actor
|
|
{Default script that lives on an actor. On hit, sets an actor variable.}
|
|
|
|
String property actorVariable Auto
|
|
int property value Auto
|
|
bool property playerOnly Auto
|
|
|
|
auto State waiting
|
|
Event onHit(objectReference akAggressor, Form akWeapon, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
|
|
if (!playerOnly || akAggressor == (Game.GetForm(0x14) as Actor))
|
|
; ;Debug.Trace("HIT: " + Self + " by " + akAggressor)
|
|
Self.SetActorValue(actorVariable, value)
|
|
Self.EvaluatePackage()
|
|
GoToState("allDone")
|
|
EndIf
|
|
endEvent
|
|
endState
|
|
|
|
State allDone
|
|
;do nothing
|
|
endState
|
|
|