Using
MakeUnselectable(999999)
also works if you control the intermediate actions of the PC by script. You need a second MakeUnselectable(1) to change back.
Thanks. I had the hardest time getting it to work until I remembered reading in the IESDP, "MakeUnselectable(I:Time*)
This action changes the active creature's selection circle to purple - making it unselectable. Creatures made unselectable stop processing scripts."
Because I had the script to make them selectable again in their script file so it wasn't triggering. I had to move those to Baldur.baf to get them to work.
So in Jan's Script file I have:
IF //Jan's script If Mazzy goes hostile.
Global("_bMazzyHostile","GLOBAL",4)
InParty("Jan")
!StateCheck("Jan",CD_STATE_NOTVALID)
THEN
RESPONSE #100
MakeUnselectable(999999)
END
IF
InParty("Jan")
!StateCheck("Jan",CD_STATE_NOTVALID)
Global("_bmahojanfight","GLOBAL",1)
THEN
RESPONSE #100
StartDialogNoSet(Player1)
END
And in Cernd's script file I have:
IF //Cernd's script If Mazzy goes hostile.
Global("_bMazzyHostile","GLOBAL",4)
InParty("Cernd")
!StateCheck("Cernd",CD_STATE_NOTVALID)
THEN
RESPONSE #100
MakeUnselectable(999999)
END
Cernd's is shorter since Jan has dialogue that triggers at the end of combat.
And then in the Baldur script file I have:
IF //Once combat ends after Mazzy going hostile. Turns off everything. Script is here because Mazzy's dead.
Global("_bMazzyHostile","GLOBAL",4)
CombatCounter(0)
Dead("Mazzy")
THEN
RESPONSE #100
SetGlobal("_bMazzyHostile","GLOBAL",5)
END
IF //End of hostilities. Turn everyone selectable again. Script is here because being unselectable turns off script files.
Global("_bMazzyHostile","GLOBAL",5)
Global("_bMazzyFightOver","GLOBAL",0)
THEN
RESPONSE #100
ActionOverride("Jan",MakeUnselectable(0))
ActionOverride("Cernd",MakeUnselectable(0))
SetGlobal("_bMazzyFightOver","GLOBAL",1)
SetGlobal("_bmahojanfight","GLOBAL",1)
END
And it works like a charm. No more pulsing triangles. They only come when I use: ChangeEnemyAlly(Myself,NEUTRAL)
Thanks!
Edited by BCaesar, 07 May 2017 - 10:17 PM.