home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Joystick Magazine 2002 December
/
JOY143_CD1.iso
/
Data
/
Demos
/
Platoon
/
pl_demo.exe
/
Inf
/
Gamelogic
/
GameEvents
/
uCmd.TurnAround.inf
< prev
next >
Wrap
INI File
|
2002-10-14
|
10KB
|
627 lines
[uCmd.TurnAround : cESEvent]
{
Name = uCmd.TurnAround
Enabled = 1
Type = 1
RefreshRate = 0
[Procedures *]
{
[: cESIf]
{
Note = ""
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cUGetCommandType]
{
}
[Value2 : cUEnumCommand]
{
ECommand = 32
}
}
[Then *]
{
[: cESSwitch]
{
Note = "Switch on command state"
[Value : cUGetCommandState]
{
}
[Case *]
{
[: cESCase]
{
Note = "0 - turnt to last known pos"
Value = 0
[Procedures *]
{
[: cUStop]
{
[Entity : cGetThisUnit]
{
}
}
[: cUStopAim]
{
[Entity : cGetThisUnit]
{
}
}
[: cESSubrutine]
{
Subrutine = uSub.SMS_Turn
}
[: cESIf]
{
Note = "Movement style change finished?"
[Condition : cESCNumEquals]
{
Note = ""
[Value1 : cUGetCommandSubState]
{
}
[Value2 : cESFIntConst]
{
Value = -1
}
}
[Then *]
{
[: cESIntToVar]
{
VariableName = OriginalAngle
Keep = 1
[Value : cUGetTurnAngle]
{
[Unit : cGetThisUnit]
{
}
}
}
[: cESIf]
{
Note = ""
[Condition : cMIsEmptyTarget]
{
Note = ""
[Target : cUGetCommandTarget]
{
}
}
[Then *]
{
[: cESLog]
{
Text = "Never seen any enemy."
}
}
[Else *]
{
[: cUTurnTo]
{
[Target : cUGetCommandTarget]
{
}
[TurnToTarget : NULL]
{
}
}
[: cESLog]
{
Text = "Turning to last known target position"
}
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 1
}
}
}
[Else *]
{
}
}
}
}
[: cESCase]
{
Note = "1 - wait if neccessary"
Value = 1
[Procedures *]
{
[: cESIf]
{
Note = ""
[Condition : cUIsTurnCompleted]
{
Note = ""
}
[Then *]
{
[: cESIntToVar]
{
VariableName = Time
Keep = 1
[Value : cESGetGlobalParameter]
{
ParamName = time_looking_in_turnaround
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 2
}
}
}
[Else *]
{
}
}
}
}
[: cESCase]
{
Note = "2 - turn to 140 degrees"
Value = 2
[Procedures *]
{
[: cESIntToVar]
{
VariableName = Time
Keep = 1
[Value : cESFIntAdd]
{
[Variable1 : cESFIntByVar]
{
VariableName = Time
}
[Variable2 : cESFIntConst]
{
Value = -1
}
}
}
[: cESIf]
{
Note = ""
[Condition : cESCNumLess]
{
Note = ""
[Value1 : cESFIntByVar]
{
VariableName = Time
}
[Value2 : cESFIntConst]
{
Value = 0
}
}
[Then *]
{
[: cUTurnToAngle]
{
[Angle : cESFIntAdd]
{
[Variable1 : cUGetTurnAngle]
{
[Unit : cGetThisUnit]
{
}
}
[Variable2 : cESFIntConst]
{
Value = 140
}
}
}
[: cESLog]
{
Text = "Turning to 140 degrees relatively"
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 3
}
}
}
[Else *]
{
}
}
}
}
[: cESCase]
{
Note = "3 - wait"
Value = 3
[Procedures *]
{
[: cESIf]
{
Note = ""
[Condition : cUIsTurnCompleted]
{
Note = ""
}
[Then *]
{
[: cESIntToVar]
{
VariableName = Time
Keep = 1
[Value : cESGetGlobalParameter]
{
ParamName = time_looking_in_turnaround
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 4
}
}
}
[Else *]
{
}
}
}
}
[: cESCase]
{
Note = "4 - turn to 80 degrees"
Value = 4
[Procedures *]
{
[: cESIntToVar]
{
VariableName = Time
Keep = 1
[Value : cESFIntAdd]
{
[Variable1 : cESFIntByVar]
{
VariableName = Time
}
[Variable2 : cESFIntConst]
{
Value = -1
}
}
}
[: cESIf]
{
Note = ""
[Condition : cESCNumLess]
{
Note = ""
[Value1 : cESFIntByVar]
{
VariableName = Time
}
[Value2 : cESFIntConst]
{
Value = 0
}
}
[Then *]
{
[: cUTurnToAngle]
{
[Angle : cESFIntAdd]
{
[Variable1 : cUGetTurnAngle]
{
[Unit : cGetThisUnit]
{
}
}
[Variable2 : cESFIntConst]
{
Value = 80
}
}
}
[: cESLog]
{
Text = "Turning to 80 degrees relatively"
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 5
}
}
}
[Else *]
{
}
}
}
}
[: cESCase]
{
Note = "5 - wait"
Value = 5
[Procedures *]
{
[: cESIf]
{
Note = ""
[Condition : cUIsTurnCompleted]
{
Note = ""
}
[Then *]
{
[: cESIntToVar]
{
VariableName = Time
Keep = 1
[Value : cESGetGlobalParameter]
{
ParamName = time_looking_in_turnaround
}
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 6
}
}
}
[Else *]
{
}
}
}
}
[: cESCase]
{
Note = "6 - turning back to original angle."
Value = 6
[Procedures *]
{
[: cESIntToVar]
{
VariableName = Time
Keep = 1
[Value : cESFIntAdd]
{
[Variable1 : cESFIntByVar]
{
VariableName = Time
}
[Variable2 : cESFIntConst]
{
Value = -1
}
}
}
[: cESIf]
{
Note = ""
[Condition : cESCNumLess]
{
Note = ""
[Value1 : cESFIntByVar]
{
VariableName = Time
}
[Value2 : cESFIntConst]
{
Value = 0
}
}
[Then *]
{
[: cUTurnToAngle]
{
[Angle : cESFIntByVar]
{
VariableName = OriginalAngle
}
}
[: cESLog]
{
Text = "Turning back to original angle"
}
[: cUSetCommandState]
{
[State : cESFIntConst]
{
Value = 7
}
}
}
[Else *]
{
}
}
}
}
[: cESCase]
{
Note = "7"
Value = 7
[Procedures *]
{
[: cESIf]
{
Note = ""
[Condition : cUIsTurnCompleted]
{
Note = ""
}
[Then *]
{
[: cESLog]
{
Text = "Turn finished. Command Complete."
}
[: cUCommandCompleted]
{
}
}
[Else *]
{
}
}
}
}
}
}
}
[Else *]
{
}
}
}
}