FatsackTony1 Posted August 14, 2016 Share Posted August 14, 2016 (edited) Hey guys I'm trying to get this script to work for my perk overhaul. It starts with a perk entry point to apply combat hit spell, the spell containing a single effect with this script attached. these are all touch/fire and forget types. ScriptName AbForceStopCombat extends ActiveMagicEffect;-- Properties --------------------------------------Spell Property PistolWhipSpell Auto;-- Variables ---------------------------------------Actor victim;-- Functions ---------------------------------------Event OnEffectStart(Actor akTarget, Actor akCaster) RegisterForHitEvent(akTarget)EndEventEvent OnHit(ObjectReference akTarget, ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, \ bool abSneakAttack, bool abBashAttack, bool abHitBlocked, string apMaterial) victim = akTarget as Actor If (abBashAttack) PistolWhipSpell.cast(victim) victim.stopcombat() EndIf RegisterForHitEvent(self) EndEventEvent OnEffectFinish(Actor akTarget, Actor akCaster) UnRegisterForHitEvent(akTarget)EndEvent Now I want it to cast the PistolWhipSpell spell property connected to the pistolwhipstun spell I made, which uses the default fo4 magic effects BlindnessPoison and DeafnessPoison which are self/fire and forget types. As well as force the npc it casts the spell on out of combat. This should let you pistol whip and become unnoticed by an enemy, even at close range. It works when I enter the effects on the npc through console commands, but I don't think it is triggering on the npc through this script. I feel it is either a problem with the Apply Combat Hit spell entry point, or the abBashAttack boolean in the OnHit event. if anyone can spot where I'm going wrong with this, please help. If you don't know what it is, but know how I can put some lines to debug what abBashAttack is and how to activate that debug messaging in game, so i can test it out myself with more sureity, that would be of great help too. Edited August 14, 2016 by FatsackTony1 Link to comment Share on other sites More sharing options...
FatsackTony1 Posted August 15, 2016 Author Share Posted August 15, 2016 Anyone? Link to comment Share on other sites More sharing options...
scrivener07 Posted August 15, 2016 Share Posted August 15, 2016 http://www.creationkit.com/fallout4/index.php?title=Enable_Debug_Logging Link to comment Share on other sites More sharing options...
Recommended Posts