Quote from: BaroniusShouldn't it be OR(4) instead of OR(3) in the first script block or did something escape my attention?Yep, corrected, thx

IF
Race(Player1,ELF)
Global("Variable","GLOBAL",1)
OR(4)
Class(Player1,FIGHTER_ALL)
Class(Player1,PALADIN_ALL)
Class(Player1,RANGER_ALL)
Class(Player1,CLERIC_ALL)
THEN
RESPONSE #100
Action()
ENDIF
Race(Player1,ELF)
Global("Variable","GLOBAL"1)
Class(Player1,FIGHTER_ALL)
THEN
RESPONSE #100
Action()
END
IF
Race(Player1,ELF)
Global("Variable","GLOBAL"1)
Class(Player1,PALADIN_ALL)
THEN
RESPONSE #100
Action()
END
IF
Race(Player1,ELF)
Global("Variable","GLOBAL"1)
Class(Player1,RANGER_ALL)
THEN
RESPONSE #100
Action()
END
IF
Race(Player1,ELF)
Global("Variable","GLOBAL"1)
Class(Player1,CLERIC_ALL)
THEN
RESPONSE #100
Action()
END//this is the original OR block (can be coded in BG2, cannot be coded in BG1)
IF
OR(3)
Trigger1
Trigger2
Trigger3
THEN
RESPONSE #100
Action()
ENDIF
!Trigger1
!Trigger2
!Trigger3
THEN
RESPONSE #100
NoAction()
ENDIF
True()
THEN
RESPONSE #100
MyAction() //actions which I want to be performed in my original OR block
END// "OR" variable must be set to 0 - we don't know whether original OR block would be performed and initially we must expect both cases
IF
GlobalGT("OR","LOCALS",0) // "OR" is greater than 0
THEN
RESPONSE #100
SetGlobal("OR","LOCALS",0) // "OR" is set to 0
Continue() // script continues to the next block !!!
END
IF
!Trigger1
!Trigger2
!Trigger3
THEN
RESPONSE #100
SetGlobal("OR","LOCALS",1) // original OR would be false
Continue() // script continues to the next block according to the script parsing rules (original OR would not be performed, the script continues to the next block)
END
IF
!GlobalGT("OR","LOCALS",0) // "OR" is not greater than 0, this block is performed. If "OR" is greater than 0, this block is not performed and the script continues to the next block
THEN
RESPONSE #100
MyAction() // the actions that we want to be performed
//no Continue() unless we explicitly want to. The original OR block would be performed, so the script should restart
END IF
Race(Player1,ELF)
Global("Variable","GLOBAL",1)
OR(4)
Class(Player1,FIGHTER_ALL)
Class(Player1,PALADIN_ALL)
Class(Player1,RANGER_ALL)
Class(Player1,CLERIC_ALL)
THEN
RESPONSE #100
Action()
ENDIF
GlobalGT("OR","LOCALS",0)
THEN
RESPONSE #100
SetGlobal("OR","LOCALS",0)
Continue()
END
IF
Race(Player1,ELF)
Global("Variable","GLOBAL",1)
!Class(Player1,FIGHTER_ALL)
!Class(Player1,PALADIN_ALL)
!Class(Player1,RANGER_ALL)
!Class(Player1,CLERIC_ALL)
THEN
RESPONSE #100
SetGlobal("OR","LOCALS",1)
Continue()
END
IF
Race(Player1,ELF)
Global("Variable","GLOBAL",1)
!GlobalGT("OR","LOCALS",0)
THEN
RESPONSE #100
Action()
ENDIF
OR(2)
!Trigger1
!Trigger2
OR(2)
!Trigger3
!Trigger4
THEN
RESPONSE #100
NoAction()
END
IF
True()
THEN
RESPONSE #100
Action()
ENDIF
GlobalGT("AND",LOCALS",0) //if "AND" is greater than 0
THEN
RESPONSE #100
SetGlobal("AND","LOCALS",0) // reset to 0
Continue() // I want to continue in the script
END
IF
OR(2)
!Trigger1
!Trigger2
OR(2)
!Trigger3
!Trigger4
THEN
RESPONSE #100
SetGlobal("AND","LOCALS",1) //My desired action cannot be performed (opposite conditions are true), so AND=1
Continue() //!! I want to continue in script because in my imaginary "(Trigger1 AND Trigger2) OR (Trigger3 AND Trigger4)" block I have now the case when its conditions are not true and the script continues to following block in these cases
END
IF
!GlobalGT("AND","LOCALS",0) // "AND" is not greater than 0
THEN
RESPONSE #100
Action() //perform desired action
//no Continue() - if this block is performed, the script restarts as it is standart.
END