FiftyTifty Posted April 18, 2020 Share Posted April 18, 2020 Got a wee bit of an issue. I've a follower framework with completely custom NPCs, and if the player accidentally shoots them a few times during combat, they'll turn on each other. I worked around this with iAllyHitCombatAllowed by increasing it to 1,000, but that has it's own issues; allied NPCs (through factions) will just let themselves be shot to death. Is there a way around this? Need to keep the robot followers from being aggressive towards the player and each other. Link to comment Share on other sites More sharing options...
UnvalidUserName Posted April 18, 2020 Share Posted April 18, 2020 You could add a script to them with the following block: OnStartCombat player MyRef.StopCombatend Link to comment Share on other sites More sharing options...
FiftyTifty Posted April 18, 2020 Author Share Posted April 18, 2020 You could add a script to them with the following block: OnStartCombat player MyRef.StopCombatendHaving constant scripts firing on the companions is out of the question. Am trying to make this as performant and clean as possible. Just noticed that my faction relations were a bit screwy, so I'll report back how that goes now that I've fixed em Link to comment Share on other sites More sharing options...
UnvalidUserName Posted April 19, 2020 Share Posted April 19, 2020 That block only fires when the scripted actor enters combat with the player. It should not cause any performance issue unless the companion is for some external reason also a designated enemy of the player. Link to comment Share on other sites More sharing options...
trashgarbage666 Posted April 19, 2020 Share Posted April 19, 2020 Just to add to what Unvalid said, the OnStartCombat block only runs at the start of combat and it only runs one time! You can confirm this yourself by temporarily adding this line to the script: Begin OnStartCombat Player; MyRef.StopCombat; PrintToConsole "firing script...";End; Then, once you're in-game, just open the console and see how many times the message prints. If you were running this in a GameMode block, your console would be flooded with messages. Link to comment Share on other sites More sharing options...
Mktavish Posted April 20, 2020 Share Posted April 20, 2020 Ya whats up with robots getting so testy , and switching to killing other members of their faction ? Getting the same behavior with robots in their own faction , but ally with Player.They start killing each other. Although I wasn't sure if it was enemy hits causing it or me ?Since I am shooting them with a weapon to add a package. Just 1 pt damage though. But like they said "OnCombatStart" is a 1 frame block. There are only 4 Begin blocks that will run multiple frames. GameModeMenuModeScriptEffectUpdateOnTrigger , which is limited to something triggering , but still will update at framerate. Link to comment Share on other sites More sharing options...
GamerRick Posted April 21, 2020 Share Posted April 21, 2020 What if you put all of them into one faction that overrides their other factions. instead of trying to figure out how to make their factions work together? Link to comment Share on other sites More sharing options...
FiftyTifty Posted April 21, 2020 Author Share Posted April 21, 2020 Yeah now that I'm coming back to this, maybe a script is the way to go. I've created a faction for them before, but noticed one thing that might be necessary, is to have the faction be allied to itself. Still haven't gotten round to testing, as I've been busy procrastinating. Link to comment Share on other sites More sharing options...
Mktavish Posted April 21, 2020 Share Posted April 21, 2020 Yeah now that I'm coming back to this, maybe a script is the way to go. I've created a faction for them before, but noticed one thing that might be necessary, is to have the faction be allied to itself. Still haven't gotten round to testing, as I've been busy procrastinating. What ? .... who would have thought to ally with self ? ... is that really the answer ?But actually knowing beth scripting ... it makes sense. I'll try some testing myself since I have a petri dish to test it. Like you said though ... that procrastination variable can get in the way :pirate: Link to comment Share on other sites More sharing options...
FiftyTifty Posted April 22, 2020 Author Share Posted April 22, 2020 Yeah now that I'm coming back to this, maybe a script is the way to go. I've created a faction for them before, but noticed one thing that might be necessary, is to have the faction be allied to itself. Still haven't gotten round to testing, as I've been busy procrastinating. What ? .... who would have thought to ally with self ? ... is that really the answer ?But actually knowing beth scripting ... it makes sense. I'll try some testing myself since I have a petri dish to test it. Like you said though ... that procrastination variable can get in the way :pirate: Yeah it's the same thing that's done for the vanilla follower faction. It's got the player faction and itself as allies. Link to comment Share on other sites More sharing options...
Recommended Posts