YuyaAcedia Posted March 10, 2020 Share Posted March 10, 2020 (edited) What is the equivalent of FNV's "begin gamemode" in Fallout 4? And how can I activate a function when an NPC is attacking. I'm working on stealth effect and I'd like to remove the stealthboy effect when the said actor is attacking. In Fallout New Vegas it used to be like that. if GetAnimAction == 2 && Cloaked == 1 RemoveSpell StealthBoyInvisibilitySpell set Cloaked to 0 PMS NightkinCloakFXShader 1 if soundcheck == 0 refvar.PlaySound3D OBJStealthBoyActivate set soundcheck to 1 endif endifThanks. EDIT: I managed to make it work. There was no reason to create a script but I needed to play with [spells] and manage specific conditions for spell's magic effects. Looks like I really need to forget about doing everything with script and use every tool of the Creation Kit. Thanks Elsidia1 for the help! Edited March 11, 2020 by Stowx Link to comment Share on other sites More sharing options...
Elsidia1 Posted March 11, 2020 Share Posted March 11, 2020 I don't understand question clearly but you try a event on hit? When actor is hit event on hit is activated. Event OnPlayerLoadGame() RegisterForHitEvent(game.getplayer()) ; there you can put npc reference in ()EndEvent Event OnHit(ObjectReference akTarget, ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked, string apMaterial) ; need to register it again. Stupid, but necessary. RegisterForHitEvent(game.getPlayer()) ; the same for NPCendevent Link to comment Share on other sites More sharing options...
Recommended Posts