lyosea Posted July 24, 2022 Share Posted July 24, 2022 I was wondering how I would go about making npcs in an interior hostile if I would to fire any weapon. I have about 10 different interiors in which the player can enter with a lot of npcs in it, but I want to make it so firing your weapon results in a penalty of npcs either being hostile or warning the player to stop firing initially before becoming hostile. I found that if you make a wall or object in the interior an activator, you can make a damage system so then when you hit it, it can call to a quest stage that makes all npcs inside hostile. But to do that would be VERY tedious to convert every static model into an activator. Is this my only solution or am I missing something here? Link to comment Share on other sites More sharing options...
SKKmods Posted July 24, 2022 Share Posted July 24, 2022 I did a do things to local actors on player weapon fire thing like this with a start game enabled quest attached script (super simplified): Event OnQuestInit() Self.RegisterForAnimationEvent(pPlayerREF, "weaponFire") EndEvent Event OnAnimationEvent(ObjectReference akSource, string asEventName) ;the only event I am registered for is player weaponfire If (pPlayerREF.WornHasKeyword(pHasSilencer) == False) pSKK_476HostileAlertFinderQuest.Start() ; fills a RefCollectionAlias with up to 8 actors within a distance Alias_HostilesFound.AddToFaction(pSKK_476PlayerHostileFaction) pSKK_476HostileAlertFinderQuest.Stop() EndIf ; best to add a cooldown timer else auto weapons can choke the script system endEvent Link to comment Share on other sites More sharing options...
lyosea Posted July 25, 2022 Author Share Posted July 25, 2022 I did a do things to local actors on player weapon fire thing like this with a start game enabled quest attached script (super simplified): Event OnQuestInit() Self.RegisterForAnimationEvent(pPlayerREF, "weaponFire") EndEvent Event OnAnimationEvent(ObjectReference akSource, string asEventName) ;the only event I am registered for is player weaponfire If (pPlayerREF.WornHasKeyword(pHasSilencer) == False) pSKK_476HostileAlertFinderQuest.Start() ; fills a RefCollectionAlias with up to 8 actors within a distance Alias_HostilesFound.AddToFaction(pSKK_476PlayerHostileFaction) pSKK_476HostileAlertFinderQuest.Stop() EndIf ; best to add a cooldown timer else auto weapons can choke the script system endEvent And what do I attached this script to? It said compiled failed when I attached it to the npc refs in the cell. Link to comment Share on other sites More sharing options...
SKKmods Posted July 25, 2022 Share Posted July 25, 2022 That is not a full script it is an outline of a possible approach. > "with a start game enabled quest attached script" I would infer that this scripted solution is unfortunaltey too complex for your current level of knowledge. Link to comment Share on other sites More sharing options...
lyosea Posted July 25, 2022 Author Share Posted July 25, 2022 That is not a full script it is an outline of a possible approach. > "with a start game enabled quest attached script" I would infer that this scripted solution is unfortunaltey too complex for your current level of knowledge.Unfortunately it is too complex for me. It's alright, i'll find some way to get through it. But thanks anyway. Link to comment Share on other sites More sharing options...
Recommended Posts