home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Joystick Magazine 2002 December
/
JOY143_CD1.iso
/
Data
/
Demos
/
Platoon
/
pl_demo.exe
/
Inf
/
Gamelogic
/
GameEvents
/
uSub.Fight.inf
< prev
next >
Wrap
INI File
|
2002-10-14
|
32KB
|
2,000 lines
[uSub.Fight : cESEvent]
{
Name = uSub.Fight
Enabled = 1
Type = 2
RefreshRate = 0
[Procedures *]
{
[: cESSubrutine]
{
Subrutine = uSub.SetWeapon
}
[: cUStoreCmdTarget]
{
VarName = DebugTarget
LocalVar = 0
[Target : cUGetSquadLastKnownTargetPos]
{
}
}
[: cESSwitch]
{
Note = ""
[Value : cUGetCommandState]
{
}
[Case *]
{
[: cESCase]
{
Note = "0 - Start, stop, select"
Value = 0
[Procedures *]
{
[: cESIf]
{
Note = "HasShotInLastFrame torlese"
[Condition : cUHasShotInLastFrame]
{
Note = ""
}
[Then *]
{
}
[Else *]
{
}
}
[: cESIntToVar]
{
VariableName = TimeBeforeShooting
Keep = 1
[Value : cESFIntConstRnd]
{
Value = 0
[Valure2 : cESGetGlobalParameter]
{
ParamName = time_rnd_before_shooting
}
}
}
[: cUAttackTargetSelection]
{
[Target : cUGetCommandTarget]
{
}
}
[: cESIf]
{
Note = ""
[Condition : cMIsEmptyTarget]
{
Note = ""
[Target : cUGetAttackTarget]
{
}
}
[Then *]
{
[: cESLog]
{
Text = "AttackTarget is empty"
}
[: cESIf]
{
Note = "StopBeforeFireCommand == TRUE?"
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cESFIntFromMember]
{
VariableName = StopBeforeFireCommand
[Object : cSGetByThisUnit]
{
}
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
[Then *]
{
[: cUStop]
{
[Entity : cGetThisUnit]
{
}
}
}
[Else *]
{
}
}
[: cUCommandCompleted]
{
}
}
[Else *]
{
[: cESSubrutine]
{
Subrutine = uSub.GetTargetCondition
}
[: cESIf]
{
Note = ""
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cESFIntByVar]
{
VariableName = TargetCondition
}
[Value2 : cESFIntConst]
{
Value = 0
}
}
[Then *]
{
[: cESLog]
{
Text = "AttackTarget is empty"
}
[: cESIf]
{
Note = "StopBeforeFireCommand == TRUE?"
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cESFIntFromMember]
{
VariableName = StopBeforeFireCommand
[Object : cSGetByThisUnit]
{
}
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
[Then *]
{
[: cUStop]
{
[Entity : cGetThisUnit]
{
}
}
}
[Else *]
{
}
}
[: cUCommandCompleted]
{
}
}
[Else *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cESSwitch]
{
Note = "Switch on TargetCondition"
[Value : cESFIntByVar]
{
VariableName = TargetCondition
}
[Case *]
{
[: cESCase]
{
Note = "1 - Approach"
Value = 1
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 1
}
}
}
}
[: cESCase]
{
Note = "2 - GetInPosition (too close)"
Value = 2
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "3 - TurnTo"
Value = 3
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 2
}
}
}
}
[: cESCase]
{
Note = "4 - GetInPosition (in ideal shoot position)"
Value = 4
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 3
}
}
}
}
[: cESCase]
{
Note = "5 - Approach and fire"
Value = 5
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 1
}
}
}
}
[: cESCase]
{
Note = "6"
Value = 6
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 5
}
}
}
}
}
}
}
}
}
}
}
}
[: cESCase]
{
Note = "1 - Start approaching"
Value = 1
[Procedures *]
{
[: cESSubrutine]
{
Subrutine = uSub.GetTargetCondition
}
[: cESSwitch]
{
Note = "Switch on TargetCondition"
[Value : cESFIntByVar]
{
VariableName = TargetCondition
}
[Case *]
{
[: cESCase]
{
Note = "0 - Start, stop, select"
Value = 0
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "1 - Approach"
Value = 1
[Procedures *]
{
[: cESSubrutine]
{
Subrutine = uSub.SMS_Assault
}
[: cESIf]
{
Note = "Ha kesz"
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cUGetCommandSubState]
{
}
[Value2 : cESFIntConst]
{
Value = -1
}
}
[Then *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetMoveTarget]
{
Translate = 0
[Target : cUGetSquadLastKnownTargetPos]
{
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 11
}
}
}
[Else *]
{
}
}
}
}
[: cESCase]
{
Note = "2 - GetInPosition (too close)"
Value = 2
[Procedures *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "3 - TurnTo"
Value = 3
[Procedures *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 2
}
}
}
}
[: cESCase]
{
Note = "4 - GetInPosition (in ideal shoot position) (identical to no. 2)"
Value = 4
[Procedures *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 3
}
}
}
}
[: cESCase]
{
Note = "5 - Approach and fire (identical to no. 1)"
Value = 5
[Procedures *]
{
[: cESSubrutine]
{
Subrutine = uSub.SMS_Assault
}
[: cESIf]
{
Note = "Ha kesz"
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cUGetCommandSubState]
{
}
[Value2 : cESFIntConst]
{
Value = -1
}
}
[Then *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetMoveTarget]
{
Translate = 0
[Target : cUGetAttackTarget]
{
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 11
}
}
}
[Else *]
{
}
}
}
}
[: cESCase]
{
Note = "6"
Value = 6
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 5
}
}
}
}
}
}
}
}
[: cESCase]
{
Note = "11 - Wait for getting in position"
Value = 11
[Procedures *]
{
[: cESSubrutine]
{
Subrutine = uSub.GetTargetCondition
}
[: cESSwitch]
{
Note = "Switch on TargetCodition"
[Value : cESFIntByVar]
{
VariableName = TargetCondition
}
[Case *]
{
[: cESCase]
{
Note = "0 - Start, stop, select"
Value = 0
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "1 - Set up the movement style again if neccessary"
Value = 1
[Procedures *]
{
[: cESSubrutine]
{
Subrutine = uSub.SMS_Assault
}
}
}
[: cESCase]
{
Note = "2 - GetInPosition (too close)"
Value = 2
[Procedures *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "3 - TurnTo"
Value = 3
[Procedures *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 2
}
}
}
}
[: cESCase]
{
Note = "4 - GetInPosition (in ideal shoot position)"
Value = 4
[Procedures *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 3
}
}
}
}
[: cESCase]
{
Note = "5 - Approach and fire"
Value = 5
[Procedures *]
{
[: cUFire]
{
}
}
}
[: cESCase]
{
Note = "6 - Stop"
Value = 6
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 5
}
}
}
}
}
}
}
}
[: cESCase]
{
Note = "2 - Stop approaching, turn"
Value = 2
[Procedures *]
{
[: cESIf]
{
Note = "If it is permitted to stop"
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cESFIntFromMember]
{
VariableName = StopBeforeFireCommand
[Object : cSGetByThisUnit]
{
}
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
[Then *]
{
[: cUStop]
{
[Entity : cGetThisUnit]
{
}
}
}
[Else *]
{
}
}
[: cESSubrutine]
{
Subrutine = uSub.GetTargetCondition
}
[: cESSwitch]
{
Note = "Switch on TargetCondition"
[Value : cESFIntByVar]
{
VariableName = TargetCondition
}
[Case *]
{
[: cESCase]
{
Note = "0 - Start, stop, select"
Value = 0
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "2 - GetInPosition (too close)"
Value = 2
[Procedures *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 3
}
}
}
}
[: cESCase]
{
Note = "3 - TurnTo"
Value = 3
[Procedures *]
{
[: cESSubrutine]
{
Subrutine = uSub.SMS_Turn
}
[: cESIf]
{
Note = Befejezte?
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cUGetCommandSubState]
{
}
[Value2 : cESFIntConst]
{
Value = -1
}
}
[Then *]
{
[: cESSubrutine]
{
Subrutine = uSub.AimBeforeShooting
}
[: cUTurnTo]
{
[Target : cUGetAttackTarget]
{
}
[TurnToTarget : NULL]
{
}
}
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 22
}
}
}
[Else *]
{
}
}
}
}
[: cESCase]
{
Note = "4 - GetInPosition (in ideal shoot position) "
Value = 4
[Procedures *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 22
}
}
}
}
[: cESCase]
{
Note = "1 - tul messze"
Value = 1
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "6 - Stop"
Value = 6
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 5
}
}
}
}
}
}
}
}
[: cESCase]
{
Note = "22 - Wait for turning"
Value = 22
[Procedures *]
{
[: cESSubrutine]
{
Subrutine = uSub.AimBeforeShooting
}
[: cESIf]
{
Note = ""
[Condition : cUIsTurnCompleted]
{
Note = ""
}
[Then *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 3
}
}
}
[Else *]
{
[: cESSubrutine]
{
Subrutine = uSub.GetTargetCondition
}
[: cESSwitch]
{
Note = "Switch on TargetCondition"
[Value : cESFIntByVar]
{
VariableName = TargetCondition
}
[Case *]
{
[: cESCase]
{
Note = "0 - Start, stop, select"
Value = 0
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "1 - tul messze"
Value = 1
[Procedures *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "2 - GetInPosition (too close)"
Value = 2
[Procedures *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "4 - GetInPosition (in ideal shoot position) "
Value = 4
[Procedures *]
{
}
}
[: cESCase]
{
Note = "5 - Fire and run"
Value = 5
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "6 - Stop"
Value = 6
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 5
}
}
}
}
}
}
}
}
}
}
[: cESCase]
{
Note = "3 - Stop approaching, get in position"
Value = 3
[Procedures *]
{
[: cESIf]
{
Note = "If it is permitted to stop"
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cESFIntFromMember]
{
VariableName = StopBeforeFireCommand
[Object : cSGetByThisUnit]
{
}
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
[Then *]
{
[: cUStop]
{
[Entity : cGetThisUnit]
{
}
}
}
[Else *]
{
}
}
[: cESSubrutine]
{
Subrutine = uSub.GetTargetCondition
}
[: cESSwitch]
{
Note = "Switch on TargetCondition"
[Value : cESFIntByVar]
{
VariableName = TargetCondition
}
[Case *]
{
[: cESCase]
{
Note = "0 - Start, stop, select"
Value = 0
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "1 - Tul messze"
Value = 1
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "2 - Stop approaching, turn"
Value = 2
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "3 - stop approaching, get in position"
Value = 3
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "4 - Wait and shoot"
Value = 4
[Procedures *]
{
[: cESSubrutine]
{
Subrutine = uSub.SMS_FireHoldingPosition
}
[: cESIf]
{
Note = "If finished..."
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cUGetCommandSubState]
{
}
[Value2 : cESFIntConst]
{
Value = -1
}
}
[Then *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 4
}
}
}
[Else *]
{
}
}
}
}
[: cESCase]
{
Note = "6 - Stop"
Value = 6
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 5
}
}
}
}
}
}
}
}
[: cESCase]
{
Note = "33 - Wait before first shoot"
Value = 33
[Procedures *]
{
[: cESIf]
{
Note = "Time is out?"
[Condition : cESCNumLess]
{
Note = ""
[Value1 : cESFIntByVar]
{
VariableName = TimeBeforeShooting
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
[Then *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 4
}
}
}
[Else *]
{
[: cESIntToVar]
{
VariableName = TimeBeforeShooting
Keep = 1
[Value : cESFIntAdd]
{
[Variable1 : cESFIntByVar]
{
VariableName = TimeBeforeShooting
}
[Variable2 : cESFIntConst]
{
Value = -1
}
}
}
}
}
}
}
[: cESCase]
{
Note = "4 - Wait and shoot"
Value = 4
[Procedures *]
{
[: cESSubrutine]
{
Subrutine = uSub.GetTargetCondition
}
[: cESSwitch]
{
Note = "Switch on TargetCondition"
[Value : cESFIntByVar]
{
VariableName = TargetCondition
}
[Case *]
{
[: cESCase]
{
Note = "0 "
Value = 0
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "1"
Value = 1
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "2"
Value = 2
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "3"
Value = 3
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "4"
Value = 4
[Procedures *]
{
[: cUFire]
{
}
}
}
[: cESCase]
{
Note = "5"
Value = 5
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "6 - Stop"
Value = 6
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 5
}
}
}
}
}
}
}
}
[: cESCase]
{
Note = "5 - Stop"
Value = 5
[Procedures *]
{
[: cESIf]
{
Note = "If it is permitted to stop"
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cESFIntFromMember]
{
VariableName = StopBeforeFireCommand
[Object : cSGetByThisUnit]
{
}
}
[Value2 : cESFIntConst]
{
Value = 1
}
}
[Then *]
{
[: cUStop]
{
[Entity : cGetThisUnit]
{
}
}
}
[Else *]
{
}
}
[: cESSubrutine]
{
Subrutine = uSub.GetTargetCondition
}
[: cESSwitch]
{
Note = "Switch on TargetCondition"
[Value : cESFIntByVar]
{
VariableName = TargetCondition
}
[Case *]
{
[: cESCase]
{
Note = "0 - Start, stop, select"
Value = 0
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "1 - tul messze"
Value = 1
[Procedures *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 1
}
}
}
}
[: cESCase]
{
Note = "2 - GetInPosition (too close)"
Value = 2
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 0
}
}
}
}
[: cESCase]
{
Note = "3 - TurnTo"
Value = 3
[Procedures *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 2
}
}
}
}
[: cESCase]
{
Note = "4 - GetInPosition (in ideal shoot position) "
Value = 4
[Procedures *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 3
}
}
}
}
[: cESCase]
{
Note = "5 - Fire and move"
Value = 5
[Procedures *]
{
[: cUSetCommandSubState]
{
[State : cESFIntConst]
{
Value = 0
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 1
}
}
}
}
[: cESCase]
{
Note = "6 - Stop"
Value = 6
[Procedures *]
{
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 5
}
}
}
}
}
}
}
}
}
}
}
}