McFearo Posted January 13, 2021 Share Posted January 13, 2021 (edited) For my NPC companion's quest, an important character is his mother. In the interests of player freedom she's non-essential as most NPCs are and it's possible to kill her. I have it set currently so that a script goes off if she dies, that causes him to stop following and attack the player, quit the party permanently so he can't be hired again, his quest is failed, and his personal faction becomes an enemy to the player faction, the works. Basically, if you kill his mom, that's it. It's over for your relationship and he's out to get you. But I realized that it's possible he would help the player to kill her if he's following currently and joins combat by default, and then get angry at the player after helping them kill his mom. So is there a way to start this script when she's attacked instead? So that as soon as she's attacked, Dixie turns hostile to the player, rather than waiting until she's dead, so that he doesn't help the player attack her. I can see one solution just being to give her really low HP so that if the player attacks her they'll kill her in one hit so that Dixie doesn't have a chance to turn hostile on her and help the player kill her. Would making her a part of Dixie's personal faction help? Edit: Nevermind! I found Begin OnHit, I can use that. Edited January 13, 2021 by McFearo Link to comment Share on other sites More sharing options...
ashtonlp101 Posted January 13, 2021 Share Posted January 13, 2021 (edited) Begin OnHit functions on anything that hits the NPC unless you define specifically what is supposed to hit it. You can use "Begin OnStartCombat player" Or "Begin OnHit Player". Edited January 13, 2021 by ashtonlp101 Link to comment Share on other sites More sharing options...
McFearo Posted January 13, 2021 Author Share Posted January 13, 2021 Begin OnHit functions on anything that hits the NPC unless you define specifically what is supposed to hit it. You can use "Begin OnStartCombat player" Or "Begin OnHit Player". Thank you! I did make it "Begin OnHit Player" just to be safe. The character will only be showing up in two locations, the Fort and the Mojave Outpost, where she's not likely to get attacked by any mobs, but better safe than sorry. Link to comment Share on other sites More sharing options...
Recommended Posts