PC attacking hostiles on sight

A quick question for those in the know.

My PC in about the 15th area of my module has suddenly got a mind of her own and is attacking hostiles without my command as soon as she sees them - and often before I do - and occasionally even just before they appear on screen. She throws up a lesser spell mantle then starts bombarding them with various spells. I just sit back and watch ! Hasn’t done this in any of the other areas.

Ideally I want her to have time, with them in full view, to assess what to do before anything happens. I’ve shortened the hostiles’ perception range but now she’s slaughtering them.

Is this a bug, feature of more advanced levels, something I’ve done or just her deciding I’m not doing a very good job of it ?

I have no idea if this is a bug or not, but as a workaround, maybe you could do a trigger when entering the area making them hostile once your PC crosses that trigger, and having them non-hostile before this?

Thanks. Yeah, that would work. I’ll try that if I can’t figure out what this is. Just got so many triggers as it is, I was trying to keep this last bit simpler.

I’ve got a fireball firing ballista from distance and I was hoping to cause carnage to whittle down their numbers before they realised what was happening. Trouble is it has to be close enough for them to appear on screen but far enough away that the ballista can be fired and the PC is spoiling that.

Check all your scripts with DetermineCombatRound() and find which one could be assigning it to the PC.

1 Like

Thanks, @NWShacker.

I’m not sure how I’d go about that though.

Open any script in the editor. Click the Find In Files icon, checking All Files In Module before searching for DetermineCombatRound (and then ActionAttack).

Or, with the module open, search the modules\temp0 folder for files containing that string with any decent search utility (e.g. Free Commander).

Sorry for necro but I want to know more about this case. Author, did you find out how this happened? I know the way how to do this on my own but it is not the most convenient way. But after that, your PC is being controlled by AI in the fight while at the same time you also can control him but in other words, you just can sit and watch AI vs AI. This is a tutorial I made how to achieve this https://steamcommunity.com/sharedfiles/filedetails/?id=1981060104

But as I said this is not the most convenient way, especially if you die and have to reload the game you have to repeat the process. Would be great to know how did you manage to get your PC acting on its own and fighting enemies on sight

I’m afraid it was 7 months ago and I can’t remember. Sorry. I do know that it was solved but no idea how. A lot has happened in the last 7 months I’m afraid. If it comes back to me I’ll post.

Did it happen on the specific module? Do you remember which module it was?

Sound to me like something in the OnEnter for that area was messing with the PC.

It was on a module I was making which I’m only just finishing. @Pstemarie may be right. That rings a distant bell…