JPTR1 Posted May 14, 2022 Share Posted May 14, 2022 Hello,I've found this "simple" script (defaultOnHitActivateLinkedRef), it just does not work like intended. Instead of "onHit" the NPC activates the link ref immediately after the cell is loaded.I would need the Enemy to activate(run to) the lever when the combat begins. ScriptName defaultOnHitActivateLinkedRef extends Actor{Default script that lives on an actor. On hit, activate the specified linkedref.}import gameimport debugbool property doOnce = false autokeyword 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 endEventendStateState allDone ;do nothingendState Any idea what i'm doing wrong? Thanks in advance! Link to comment Share on other sites More sharing options...
Sphered Posted May 14, 2022 Share Posted May 14, 2022 You make me wonder if havok settling can trigger that event. Suppose I've never particularly looked for that At any rate, two routes off the top of my head. You could simply use a condition for akAggressor. Assuming only the player is eligible, use that. Otherwise what you could do is an OnLoad() Event where then, perhaps after a Wait(1.0) or so, then go to that ready-to-hit state Link to comment Share on other sites More sharing options...
Tlam99 Posted May 14, 2022 Share Posted May 14, 2022 Make an activator with self destruct. Link to comment Share on other sites More sharing options...
Recommended Posts