home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Joystick Magazine 2002 December
/
JOY143_CD1.iso
/
Data
/
Demos
/
Platoon
/
pl_demo.exe
/
Inf
/
Gamelogic
/
GameEvents
/
uSub.GetTargetCondition-A_All.inf
< prev
next >
Wrap
INI File
|
2002-10-14
|
74KB
|
3,396 lines
[uSub.GetTargetCondition/A_All : cESEvent]
{
Name = uSub.GetTargetCondition/A_All
Enabled = 1
Type = 2
RefreshRate = 0
[Procedures *]
{
[: cESSwitch]
{
Note = "Switch on debug_level"
[Value : cESGetGlobalParameter]
{
ParamName = debug_level
}
[Case *]
{
[: cESCase]
{
Note = "1 - state"
Value = 1
[Procedures *]
{
[: cESLog]
{
Text = "-----------------------------"
}
[: cESSwitch]
{
Note = "Print command state."
[Value : cUGetCommandState]
{
}
[Case *]
{
[: cESCase]
{
Note = "0"
Value = 0
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 0."
}
}
}
[: cESCase]
{
Note = "1"
Value = 1
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 1."
}
}
}
[: cESCase]
{
Note = "11"
Value = 11
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 11."
}
}
}
[: cESCase]
{
Note = "2"
Value = 2
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 2."
}
}
}
[: cESCase]
{
Note = "22"
Value = 22
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 22."
}
}
}
[: cESCase]
{
Note = "3"
Value = 3
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 3."
}
}
}
[: cESCase]
{
Note = "33"
Value = 33
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 33."
}
}
}
[: cESCase]
{
Note = "4"
Value = 4
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 4."
}
}
}
[: cESCase]
{
Note = "44"
Value = 44
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 44."
}
}
}
[: cESCase]
{
Note = "5"
Value = 5
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 5."
}
}
}
[: cESCase]
{
Note = "55"
Value = 55
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 55."
}
}
}
[: cESCase]
{
Note = "6"
Value = 6
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 6."
}
}
}
[: cESCase]
{
Note = "66"
Value = 66
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 66."
}
}
}
}
}
}
}
[: cESCase]
{
Note = "2 - everything"
Value = 2
[Procedures *]
{
[: cESLog]
{
Text = "-----------------------------"
}
[: cESSwitch]
{
Note = "Print command state."
[Value : cUGetCommandState]
{
}
[Case *]
{
[: cESCase]
{
Note = "0"
Value = 0
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 0."
}
}
}
[: cESCase]
{
Note = "1"
Value = 1
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 1."
}
}
}
[: cESCase]
{
Note = "11"
Value = 11
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 11."
}
}
}
[: cESCase]
{
Note = "2"
Value = 2
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 2."
}
}
}
[: cESCase]
{
Note = "22"
Value = 22
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 22."
}
}
}
[: cESCase]
{
Note = "3"
Value = 3
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 3."
}
}
}
[: cESCase]
{
Note = "33"
Value = 33
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 33."
}
}
}
[: cESCase]
{
Note = "4"
Value = 4
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 4."
}
}
}
[: cESCase]
{
Note = "44"
Value = 44
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 44."
}
}
}
[: cESCase]
{
Note = "5"
Value = 5
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 5."
}
}
}
[: cESCase]
{
Note = "55"
Value = 55
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 55."
}
}
}
[: cESCase]
{
Note = "6"
Value = 6
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 6."
}
}
}
[: cESCase]
{
Note = "66"
Value = 66
[Procedures *]
{
[: cESLog]
{
Text = "==> CommandState = 66."
}
}
}
}
}
[: cESIf]
{
Note = "Entitiy or pos?"
[Condition : cIsCommandTargetEntity]
{
Note = ""
[Target : cUGetAttackTarget]
{
}
}
[Then *]
{
[: cESLog]
{
Text = "==> AttackTarget is an ENTITY."
}
}
[Else *]
{
[: cESLog]
{
Text = "==> AttackTarget is a POSITION."
}
}
}
[: cESIf]
{
Note = "Is target empty?"
[Condition : cMIsEmptyTarget]
{
Note = ""
[Target : cUGetAttackTarget]
{
}
}
[Then *]
{
[: cESLog]
{
Text = "==> AttackTarget is EMPTY."
}
}
[Else *]
{
[: cESLog]
{
Text = "==> AttackTarget is NOT EMPTY."
}
}
}
[: cESIf]
{
Note = "Guard Mode?"
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cESFIntFromMember]
{
VariableName = GuardMode
[Object : cSGetByThisSquad]
{
}
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
[Then *]
{
[: cESLog]
{
Text = "==> GuardMode ON"
}
}
[Else *]
{
[: cESLog]
{
Text = "==> GuardMode OFF"
}
}
}
[: cESIf]
{
Note = Moving?
[Condition : cUIsMoveTargetReached]
{
Note = ""
}
[Then *]
{
[: cESLog]
{
Text = "==> Unit is NOT MOVING."
}
}
[Else *]
{
[: cESLog]
{
Text = "==> Unit is MOVING."
}
}
}
[: cESIf]
{
Note = "Is in shoot range?"
[Condition : cESCNumLess]
{
Note = ""
[Value1 : cEGetDistance]
{
[Source : cGetThisUnit]
{
}
[Dest : cUGetAttackTarget]
{
}
}
[Value2 : cGGetWeaponMaxRange]
{
[Squad : cSGetByThisUnit]
{
}
}
}
[Then *]
{
[: cESLog]
{
Text = "==> AttackTarget is IN SHOOT RANGE."
}
}
[Else *]
{
[: cESLog]
{
Text = "==> AttackTarget is NOT IN SHOOT RANGE."
}
}
}
[: cESIf]
{
Note = "Is in too close?"
[Condition : cESCNumLess]
{
Note = ""
[Value1 : cEGetDistance]
{
[Source : cGetThisUnit]
{
}
[Dest : cUGetAttackTarget]
{
}
}
[Value2 : cGGetWeaponMinRange]
{
[Squad : cSGetByThisUnit]
{
}
}
}
[Then *]
{
[: cESLog]
{
Text = "==> AttackTarget is TOO CLOSE."
}
}
[Else *]
{
[: cESLog]
{
Text = "==> AttackTarget is NOT TOO CLOSE."
}
}
}
[: cESIf]
{
Note = "Is in AssaultRangeMax?"
[Condition : cESCNumLess]
{
Note = ""
[Value1 : cEGetDistance]
{
[Source : cGetThisUnit]
{
}
[Dest : cUGetAttackTarget]
{
}
}
[Value2 : cUGetAssaultRangeMax]
{
[Unit : cGetThisUnit]
{
}
}
}
[Then *]
{
[: cESLog]
{
Text = "==> AttackTarget is IN ASSAULT RANGE MAX."
}
}
[Else *]
{
[: cESLog]
{
Text = "==> AttackTarget is NOT IN ASSAULT RANGE MAX."
}
}
}
[: cESIf]
{
Note = "Is in AssaultRangeMin?"
[Condition : cESCNumLess]
{
Note = ""
[Value1 : cEGetDistance]
{
[Source : cGetThisUnit]
{
}
[Dest : cUGetAttackTarget]
{
}
}
[Value2 : cUGetAssaultRangeMin]
{
[Unit : cGetThisUnit]
{
}
}
}
[Then *]
{
[: cESLog]
{
Text = "==> AttackTarget is IN ASSAULT RANGE MIN."
}
}
[Else *]
{
[: cESLog]
{
Text = "==> AttackTarget is NOT IN ASSAULT RANGE MIN."
}
}
}
[: cESSubrutine]
{
Subrutine = uSub.IsTargetReachable
}
[: cESIf]
{
Note = "Is Reachable?"
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cESFIntByVar]
{
VariableName = TargetReachable
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
[Then *]
{
[: cESLog]
{
Text = "==> Target is REACHABLE."
}
}
[Else *]
{
[: cESLog]
{
Text = "==> Target is NOT REACHABLE."
}
}
}
[: cESIf]
{
Note = "Is target visible?"
[Condition : cUIsUnitInLOSBySide]
{
Note = ""
[Unit : cUGetAttackTarget]
{
}
}
[Then *]
{
[: cESLog]
{
Text = "==> Target is VISIBLE."
}
}
[Else *]
{
[: cESLog]
{
Text = "==> Target is NOT VISIBLE."
}
}
}
[: cESIf]
{
Note = CanShootInvisible?
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cESFIntFromMember]
{
VariableName = CanShootInvisible
[Object : cSGetByThisUnit]
{
}
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
[Then *]
{
[: cESLog]
{
Text = "==> Unit CAN SHOOT INVISIBLE."
}
}
[Else *]
{
[: cESLog]
{
Text = "==> Unit CAN NOT SHOOT INVISIBLE."
}
}
}
[: cESIf]
{
Note = "Has Line of Fire?"
[Condition : cUHasLineOfFire]
{
Note = ""
[Who : cGetThisUnit]
{
}
[At : cUGetAttackTarget]
{
}
}
[Then *]
{
[: cESLog]
{
Text = "==> Unit has LOF to attack target."
}
}
[Else *]
{
[: cESLog]
{
Text = "==> Unit has NOT LOF to attack target."
}
}
}
[: cESIf]
{
Note = "Movement style."
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cUGetMovementStyle]
{
}
[Value2 : cUEnumMovementStyle]
{
EMovementStyle = 1
}
}
[Then *]
{
[: cESLog]
{
Text = "==> Movement style: CRAWL."
}
}
[Else *]
{
[: cESIf]
{
Note = "Movement style."
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cUGetMovementStyle]
{
}
[Value2 : cUEnumMovementStyle]
{
EMovementStyle = 2
}
}
[Then *]
{
[: cESLog]
{
Text = "==> Movement style: NORMAL."
}
}
[Else *]
{
[: cESIf]
{
Note = "Movement style."
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cUGetMovementStyle]
{
}
[Value2 : cUEnumMovementStyle]
{
EMovementStyle = 3
}
}
[Then *]
{
[: cESLog]
{
Text = "==> Movement style: FAST."
}
}
[Else *]
{
}
}
}
}
}
}
}
}
}
}
[: cESIf]
{
Note = ""
[Condition : cMIsEmptyTarget]
{
Note = ""
[Target : cUGetAttackTarget]
{
}
}
[Then *]
{
[: cESLog]
{
Text = "TargetCondition = 0; Ures az AttackTarget"
}
[: cESIntToVar]
{
VariableName = CommandTarget
Keep = 0
[Value : cESFIntConst]
{
Value = 0
}
}
}
[Else *]
{
[: cESIf]
{
Note = "Celpont tipusa entity es nem el?"
[Condition : cESCAnd]
{
Note = ""
[AndConditions *]
{
[: cIsCommandTargetEntity]
{
Note = ""
[Target : cUGetAttackTarget]
{
}
}
[: cESCNot]
{
Note = ""
[Condition : cUCanAttack]
{
Note = ""
[SourceUnit : cGetThisUnit]
{
}
[TargetUnit : cUGetAttackTarget]
{
}
}
}
}
}
[Then *]
{
[: cESLog]
{
Text = "TargetCondition = 0; Target unit is dead"
}
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 0
}
}
}
[Else *]
{
[: cESIf]
{
Note = "Out of ammo?"
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cGUGetAmmo]
{
AmmoType = 7
[Unit : cGetThisUnit]
{
}
}
[Value2 : cESFIntConst]
{
Value = 0
}
}
[Then *]
{
[: cESLog]
{
Text = "Out of ammo. Command Complete issued. IMMEDIEATELY!!!"
}
[: cUCommandCompleted]
{
}
}
[Else *]
{
[: cESIf]
{
Note = "CMD == FIRE || CMD == RETURN FIRE || CMD == THROW_GRENADE?"
[Condition : cESCOr]
{
Note = ""
[OrConditions *]
{
[: cESCNumEquals]
{
Note = FIRE?
[Value1 : cUGetCommandType]
{
}
[Value2 : cUEnumCommand]
{
ECommand = 7
}
}
[: cESCNumEquals]
{
Note = FIRE_MULTIPLEFIRE_MULTIPLE?
[Value1 : cUGetCommandType]
{
}
[Value2 : cUEnumCommand]
{
ECommand = 28
}
}
[: cESCNumEquals]
{
Note = THROW_GRENADE?
[Value1 : cUGetCommandType]
{
}
[Value2 : cUEnumCommand]
{
ECommand = 18
}
}
[: cESCNumEquals]
{
Note = "RETURN FIRE?"
[Value1 : cUGetCommandType]
{
}
[Value2 : cUEnumCommand]
{
ECommand = 29
}
}
}
}
[Then *]
{
[: cESIf]
{
Note = GuardMode?
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cESFIntFromMember]
{
VariableName = GuardMode
[Object : cSGetByThisUnit]
{
}
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
[Then *]
{
[: cESIf]
{
Note = ""
[Condition : cUIsInShootRange]
{
Note = ""
[Target : cUGetAttackTarget]
{
}
}
[Then *]
{
[: cESIf]
{
Note = "MinRange-nel kozelebb van?"
[Condition : cESCNumLess]
{
Note = ""
[Value1 : cEGetDistance]
{
[Source : cGetThisUnit]
{
}
[Dest : cUGetAttackTarget]
{
}
}
[Value2 : cGGetWeaponMinRange]
{
[Squad : cSGetByThisUnit]
{
}
}
}
[Then *]
{
[: cESLog]
{
Text = "TargetCondition = 2; Target is too close."
}
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 2
}
}
}
[Else *]
{
[: cESSubrutine]
{
Subrutine = uSub.IsTargetReachable
}
[: cESIf]
{
Note = "Arra nez?"
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cESFIntByVar]
{
VariableName = TargetReachable
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
[Then *]
{
[: cESIf]
{
Note = "(HasLOF && Visible) || CanShootInvisible"
[Condition : cESCOr]
{
Note = ""
[OrConditions *]
{
[: cESCAnd]
{
Note = ""
[AndConditions *]
{
[: cUHasLineOfFire]
{
Note = ""
[Who : cGetThisUnit]
{
}
[At : cUGetAttackTarget]
{
}
}
[: cUIsUnitInLOSBySide]
{
Note = ""
[Unit : cUGetAttackTarget]
{
}
}
}
}
[: cESCNumEquals]
{
Note = ""
[Value1 : cESFIntFromMember]
{
VariableName = CanShootInvisible
[Object : cSGetByThisUnit]
{
}
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
}
}
[Then *]
{
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 4
}
}
[: cESLog]
{
Text = "TargetCondition = 4"
}
}
[Else *]
{
[: cESLog]
{
Text = "TargetCondition = 0; No LOS to AttackTarget"
}
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 0
}
}
}
}
}
[Else *]
{
[: cESSubrutine]
{
Subrutine = uSub.GTC_Turn
}
}
}
}
}
}
[Else *]
{
[: cESLog]
{
Text = "Out of range! (Guard mode ON) IMMEDIATELY!!!"
}
[: cUCommandCompleted]
{
}
}
}
}
[Else *]
{
[: cESIf]
{
Note = ""
[Condition : cUIsMoveTargetReached]
{
Note = ""
}
[Then *]
{
[: cESIf]
{
Note = ""
[Condition : cUIsInShootRange]
{
Note = ""
[Target : cUGetAttackTarget]
{
}
}
[Then *]
{
[: cESIf]
{
Note = "MinRange-nel kozelebb van?"
[Condition : cESCNumLess]
{
Note = ""
[Value1 : cEGetDistance]
{
[Source : cGetThisUnit]
{
}
[Dest : cUGetAttackTarget]
{
}
}
[Value2 : cGGetWeaponMinRange]
{
[Squad : cSGetByThisUnit]
{
}
}
}
[Then *]
{
[: cESLog]
{
Text = "TargetCondition = 2; Target is too close."
}
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 2
}
}
}
[Else *]
{
[: cESSubrutine]
{
Subrutine = uSub.IsTargetReachable
}
[: cESIf]
{
Note = ""
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cESFIntByVar]
{
VariableName = TargetReachable
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
[Then *]
{
[: cESIf]
{
Note = "(HasLOF && Visible) || CanShootInvisible"
[Condition : cESCOr]
{
Note = ""
[OrConditions *]
{
[: cESCAnd]
{
Note = ""
[AndConditions *]
{
[: cUHasLineOfFire]
{
Note = ""
[Who : cGetThisUnit]
{
}
[At : cUGetAttackTarget]
{
}
}
[: cUIsUnitInLOSBySide]
{
Note = ""
[Unit : cUGetAttackTarget]
{
}
}
}
}
[: cESCNumEquals]
{
Note = ""
[Value1 : cESFIntFromMember]
{
VariableName = CanShootInvisible
[Object : cSGetByThisUnit]
{
}
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
}
}
[Then *]
{
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 4
}
}
[: cESLog]
{
Text = "TargetCondition = 4"
}
}
[Else *]
{
[: cESIf]
{
Note = "IsAnyMemberFiring || Visible?"
[Condition : cESCOr]
{
Note = ""
[OrConditions *]
{
[: cUIsAnyMemberFiring]
{
Note = ""
}
[: cUIsUnitInLOSBySide]
{
Note = ""
[Unit : cUGetAttackTarget]
{
}
}
}
}
[Then *]
{
[: cESSubrutine]
{
Subrutine = uSub.GTC_Run
}
}
[Else *]
{
[: cESLog]
{
Text = "TargetCondition = 0; No LOS to AttackTarget"
}
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 0
}
}
}
}
}
}
}
[Else *]
{
[: cESSubrutine]
{
Subrutine = uSub.GTC_Turn
}
}
}
}
}
}
[Else *]
{
[: cESIf]
{
Note = "0-s vagy 1-es statben van? Azaz most indul?"
[Condition : cESCOr]
{
Note = ""
[OrConditions *]
{
[: cESCNumEquals]
{
Note = ""
[Value1 : cUGetCommandState]
{
}
[Value2 : cESFIntConst]
{
Value = 0
}
}
[: cESCNumEquals]
{
Note = ""
[Value1 : cUGetCommandState]
{
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
}
}
[Then *]
{
[: cESIf]
{
Note = "IsAnyMemberFiring || Visible?"
[Condition : cESCOr]
{
Note = ""
[OrConditions *]
{
[: cUIsAnyMemberFiring]
{
Note = ""
}
[: cUIsUnitInLOSBySide]
{
Note = ""
[Unit : cUGetAttackTarget]
{
}
}
}
}
[Then *]
{
[: cESSubrutine]
{
Subrutine = uSub.GTC_Run
}
}
[Else *]
{
[: cESIf]
{
Note = ""
[Condition : cUIsUserCommand]
{
Note = ""
}
[Then *]
{
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 1
}
}
[: cESLog]
{
Text = "TargetCondition = 1"
}
}
[Else *]
{
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 0
}
}
[: cESLog]
{
Text = "TargetCondition = 0"
}
}
}
}
}
}
[Else *]
{
[: cESSubrutine]
{
Subrutine = uSub.IsTargetReachable
}
[: cESIf]
{
Note = ""
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cESFIntByVar]
{
VariableName = TargetReachable
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
[Then *]
{
[: cESIf]
{
Note = "(HasLOF && Visible) || CanShootInvisible"
[Condition : cESCOr]
{
Note = ""
[OrConditions *]
{
[: cESCAnd]
{
Note = ""
[AndConditions *]
{
[: cUHasLineOfFire]
{
Note = ""
[Who : cGetThisUnit]
{
}
[At : cUGetAttackTarget]
{
}
}
[: cUIsUnitInLOSBySide]
{
Note = ""
[Unit : cUGetAttackTarget]
{
}
}
}
}
[: cESCNumEquals]
{
Note = ""
[Value1 : cESFIntFromMember]
{
VariableName = CanShootInvisible
[Object : cSGetByThisUnit]
{
}
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
}
}
[Then *]
{
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 4
}
}
[: cESLog]
{
Text = "TargetCondition = 4"
}
}
[Else *]
{
[: cESIf]
{
Note = "IsAnyMemberFiring || Visible?"
[Condition : cESCOr]
{
Note = ""
[OrConditions *]
{
[: cUIsAnyMemberFiring]
{
Note = ""
}
[: cUIsUnitInLOSBySide]
{
Note = ""
[Unit : cUGetAttackTarget]
{
}
}
}
}
[Then *]
{
[: cESSubrutine]
{
Subrutine = uSub.GTC_Run
}
}
[Else *]
{
[: cESLog]
{
Text = "TargetCondition = 0; No LOS to AttackTarget"
}
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 0
}
}
}
}
}
}
}
[Else *]
{
[: cESSubrutine]
{
Subrutine = uSub.GTC_Turn
}
}
}
}
}
}
}
}
[Else *]
{
[: cESIf]
{
Note = "Distance < ShootRange - 5m"
[Condition : cESCNumLess]
{
Note = ""
[Value1 : cEGetDistance]
{
[Source : cGetThisUnit]
{
}
[Dest : cUGetAttackTarget]
{
}
}
[Value2 : cESFIntAdd]
{
[Variable1 : cGGetWeaponMaxRange]
{
[Squad : cSGetByThisUnit]
{
}
}
[Variable2 : cESFIntConst]
{
Value = -5
}
}
}
[Then *]
{
[: cESSubrutine]
{
Subrutine = uSub.IsTargetReachable
}
[: cESIf]
{
Note = ""
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cESFIntByVar]
{
VariableName = TargetReachable
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
[Then *]
{
[: cESIf]
{
Note = "(HasLOF && Visible) || CanShootInvisible"
[Condition : cESCOr]
{
Note = ""
[OrConditions *]
{
[: cESCAnd]
{
Note = ""
[AndConditions *]
{
[: cUHasLineOfFire]
{
Note = ""
[Who : cGetThisUnit]
{
}
[At : cUGetAttackTarget]
{
}
}
[: cUIsUnitInLOSBySide]
{
Note = ""
[Unit : cUGetAttackTarget]
{
}
}
}
}
[: cESCNumEquals]
{
Note = ""
[Value1 : cESFIntFromMember]
{
VariableName = CanShootInvisible
[Object : cSGetByThisUnit]
{
}
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
}
}
[Then *]
{
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 4
}
}
[: cESLog]
{
Text = "TargetCondition = 4"
}
}
[Else *]
{
[: cESIf]
{
Note = "IsAnyMemberFiring || Visible?"
[Condition : cESCOr]
{
Note = ""
[OrConditions *]
{
[: cUIsAnyMemberFiring]
{
Note = ""
}
[: cUIsUnitInLOSBySide]
{
Note = ""
[Unit : cUGetAttackTarget]
{
}
}
}
}
[Then *]
{
[: cESSubrutine]
{
Subrutine = uSub.GTC_Run
}
}
[Else *]
{
[: cESLog]
{
Text = "TargetCondition = 0; No LOS to AttackTarget"
}
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 0
}
}
}
}
}
}
}
[Else *]
{
[: cESSubrutine]
{
Subrutine = uSub.GTC_Turn
}
}
}
}
[Else *]
{
[: cESSubrutine]
{
Subrutine = uSub.GTC_Run
}
}
}
}
}
}
}
}
[Else *]
{
[: cESIf]
{
Note = "CMD == ASSAULT?"
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cUGetCommandType]
{
}
[Value2 : cUEnumCommand]
{
ECommand = 11
}
}
[Then *]
{
[: cESIf]
{
Note = "Guard mode?"
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cESFIntFromMember]
{
VariableName = GuardMode
[Object : cGetThisUnit]
{
}
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
[Then *]
{
[: cESLog]
{
Text = "TargetCondition = 0; WARNING: Cannot assault in guard mode!"
}
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 0
}
}
}
[Else *]
{
[: cESIf]
{
Note = "Ha nem mozog:"
[Condition : cUIsMoveTargetReached]
{
Note = ""
}
[Then *]
{
[: cESIf]
{
Note = "Distance < AssaultRangeMax?"
[Condition : cESCNumLess]
{
Note = ""
[Value1 : cEGetDistance]
{
[Source : cGetThisUnit]
{
}
[Dest : cUGetAttackTarget]
{
}
}
[Value2 : cUGetAssaultRangeMax]
{
[Unit : cGetThisUnit]
{
}
}
}
[Then *]
{
[: cESIf]
{
Note = ""
[Condition : cUIsInShootRange]
{
Note = ""
[Target : cUGetAttackTarget]
{
}
}
[Then *]
{
[: cESIf]
{
Note = ""
[Condition : cESCNumLess]
{
Note = ""
[Value1 : cEGetDistance]
{
[Source : cGetThisUnit]
{
}
[Dest : cUGetCommandTarget]
{
}
}
[Value2 : cGGetWeaponMinRange]
{
[Squad : NULL]
{
}
}
}
[Then *]
{
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 2
}
}
[: cESLog]
{
Text = "TargetCondition = 2"
}
}
[Else *]
{
[: cESSubrutine]
{
Subrutine = uSub.IsTargetReachable
}
[: cESIf]
{
Note = ""
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cESFIntByVar]
{
VariableName = TargetReachable
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
[Then *]
{
[: cESIf]
{
Note = "(HasLOF && Visible) || CanShootInvisible"
[Condition : cESCOr]
{
Note = ""
[OrConditions *]
{
[: cESCAnd]
{
Note = ""
[AndConditions *]
{
[: cUHasLineOfFire]
{
Note = ""
[Who : cGetThisUnit]
{
}
[At : cUGetAttackTarget]
{
}
}
[: cUIsUnitInLOSBySide]
{
Note = ""
[Unit : cUGetAttackTarget]
{
}
}
}
}
[: cESCNumEquals]
{
Note = ""
[Value1 : cESFIntFromMember]
{
VariableName = CanShootInvisible
[Object : cSGetByThisUnit]
{
}
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
}
}
[Then *]
{
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 4
}
}
[: cESLog]
{
Text = "TargetCondition = 4"
}
}
[Else *]
{
[: cESIf]
{
Note = "Visible || 5 m-nel kozelebb vagyunk az utoljara ismert helyetol?"
[Condition : cESCOr]
{
Note = ""
[OrConditions *]
{
[: cESCNumLess]
{
Note = ""
[Value1 : cEGetDistance]
{
[Source : cGetThisUnit]
{
}
[Dest : cUGetSquadLastKnownTargetPos]
{
}
}
[Value2 : cESFIntConst]
{
Value = 5
}
}
[: cUIsUnitInLOSBySide]
{
Note = ""
[Unit : cUGetAttackTarget]
{
}
}
}
}
[Then *]
{
[: cESLog]
{
Text = "TargetCondition = 0; No LOS to AttackTarget"
}
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 0
}
}
}
[Else *]
{
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 1
}
}
[: cESLog]
{
Text = "TargetCondition = 1"
}
}
}
}
}
}
[Else *]
{
[: cESSubrutine]
{
Subrutine = uSub.GTC_Turn
}
}
}
}
}
}
[Else *]
{
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 1
}
}
[: cESLog]
{
Text = "TargetCondition = 1"
}
}
}
}
[Else *]
{
[: cESIf]
{
Note = ""
[Condition : cUIsInShootRange]
{
Note = ""
[Target : cUGetAttackTarget]
{
}
}
[Then *]
{
[: cESIf]
{
Note = "State == 0 || State == 1?"
[Condition : cESCOr]
{
Note = ""
[OrConditions *]
{
[: cESCNumEquals]
{
Note = ""
[Value1 : cUGetCommandState]
{
}
[Value2 : cESFIntConst]
{
Value = 0
}
}
[: cESCNumEquals]
{
Note = ""
[Value1 : cUGetCommandState]
{
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
}
}
[Then *]
{
[: cESSubrutine]
{
Subrutine = uSub.GTC_Run
}
}
[Else *]
{
[: cESSubrutine]
{
Subrutine = uSub.IsTargetReachable
}
[: cESIf]
{
Note = ""
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cESFIntByVar]
{
VariableName = TargetReachable
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
[Then *]
{
[: cESIf]
{
Note = "(HasLOF && Visible) || CanShootInvisible"
[Condition : cESCOr]
{
Note = ""
[OrConditions *]
{
[: cESCAnd]
{
Note = ""
[AndConditions *]
{
[: cUHasLineOfFire]
{
Note = ""
[Who : cGetThisUnit]
{
}
[At : cUGetAttackTarget]
{
}
}
[: cUIsUnitInLOSBySide]
{
Note = ""
[Unit : cUGetAttackTarget]
{
}
}
}
}
[: cESCNumEquals]
{
Note = ""
[Value1 : cESFIntFromMember]
{
VariableName = CanShootInvisible
[Object : cSGetByThisUnit]
{
}
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
}
}
[Then *]
{
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 4
}
}
[: cESLog]
{
Text = "TargetCondition = 4"
}
}
[Else *]
{
[: cESIf]
{
Note = "Visible || 5 m-nel kozelebb vagyunk az utoljara ismert helyetol?"
[Condition : cESCOr]
{
Note = ""
[OrConditions *]
{
[: cESCNumLess]
{
Note = ""
[Value1 : cEGetDistance]
{
[Source : cGetThisUnit]
{
}
[Dest : cUGetSquadLastKnownTargetPos]
{
}
}
[Value2 : cESFIntConst]
{
Value = 5
}
}
[: cUIsUnitInLOSBySide]
{
Note = ""
[Unit : cUGetAttackTarget]
{
}
}
}
}
[Then *]
{
[: cESLog]
{
Text = "TargetCondition = 0; No LOS to AttackTarget"
}
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 0
}
}
}
[Else *]
{
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 1
}
}
[: cESLog]
{
Text = "TargetCondition = 1"
}
}
}
}
}
}
[Else *]
{
[: cESSubrutine]
{
Subrutine = uSub.GTC_Turn
}
}
}
}
}
}
[Else *]
{
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 1
}
}
[: cESLog]
{
Text = "TargetCondition = 1"
}
}
}
}
}
}
[Else *]
{
[: cESIf]
{
Note = IsInShootRange?
[Condition : cUIsInShootRange]
{
Note = ""
[Target : cUGetAttackTarget]
{
}
}
[Then *]
{
[: cESIf]
{
Note = "Distance < AssaultRangeMin?"
[Condition : cESCNumLess]
{
Note = ""
[Value1 : cEGetDistance]
{
[Source : cGetThisUnit]
{
}
[Dest : cUGetAttackTarget]
{
}
}
[Value2 : cUGetAssaultRangeMin]
{
[Unit : cGetThisUnit]
{
}
}
}
[Then *]
{
[: cESIf]
{
Note = "(HasLOF && Visible) || CanShootInvisible"
[Condition : cESCOr]
{
Note = ""
[OrConditions *]
{
[: cESCAnd]
{
Note = ""
[AndConditions *]
{
[: cUHasLineOfFire]
{
Note = ""
[Who : cGetThisUnit]
{
}
[At : cUGetAttackTarget]
{
}
}
[: cUIsUnitInLOSBySide]
{
Note = ""
[Unit : cUGetAttackTarget]
{
}
}
}
}
[: cESCNumEquals]
{
Note = ""
[Value1 : cESFIntFromMember]
{
VariableName = CanShootInvisible
[Object : cSGetByThisUnit]
{
}
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
}
}
[Then *]
{
[: cESSubrutine]
{
Subrutine = uSub.IsTargetReachable
}
[: cESIf]
{
Note = ""
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cESFIntByVar]
{
VariableName = TargetReachable
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
[Then *]
{
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 4
}
}
[: cESLog]
{
Text = "TargetCondition = 4"
}
}
[Else *]
{
[: cESSubrutine]
{
Subrutine = uSub.GTC_Turn
}
}
}
}
[Else *]
{
[: cESIf]
{
Note = "Visible || 5 m-nel kozelebb vagyunk az utoljara ismert helyetol?"
[Condition : cESCOr]
{
Note = ""
[OrConditions *]
{
[: cESCNumLess]
{
Note = ""
[Value1 : cEGetDistance]
{
[Source : cGetThisUnit]
{
}
[Dest : cUGetSquadLastKnownTargetPos]
{
}
}
[Value2 : cESFIntConst]
{
Value = 5
}
}
[: cUIsUnitInLOSBySide]
{
Note = ""
[Unit : cUGetAttackTarget]
{
}
}
}
}
[Then *]
{
[: cESLog]
{
Text = "TargetCondition = 0; No LOS to AttackTarget"
}
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 0
}
}
}
[Else *]
{
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 1
}
}
[: cESLog]
{
Text = "TargetCondition = 1"
}
}
}
}
}
}
[Else *]
{
[: cESSubrutine]
{
Subrutine = uSub.GTC_Run
}
}
}
}
[Else *]
{
[: cESIntToVar]
{
VariableName = TargetCondition
Keep = 0
[Value : cESFIntConst]
{
Value = 1
}
}
[: cESLog]
{
Text = "TargetCondition = 1"
}
}
}
}
}
}
}
}
[Else *]
{
}
}
}
}
}
}
}
}
}
}
}
}