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 >
INI File  |  2002-10-14  |  10KB  |  627 lines

  1.  
  2. [uCmd.TurnAround : cESEvent]
  3. {
  4.     Name = uCmd.TurnAround
  5.     Enabled = 1
  6.     Type = 1
  7.     RefreshRate = 0
  8.  
  9.     [Procedures *]
  10.     {
  11.  
  12.         [: cESIf]
  13.         {
  14.             Note = ""
  15.  
  16.             [Condition : cESCNumEquals]
  17.             {
  18.                 Note = ""
  19.  
  20.                 [Value1 : cUGetCommandType]
  21.                 {
  22.  
  23.                 }
  24.                 [Value2 : cUEnumCommand]
  25.                 {
  26.                     ECommand = 32
  27.  
  28.                 }
  29.             }
  30.             [Then *]
  31.             {
  32.  
  33.                 [: cESSwitch]
  34.                 {
  35.                     Note = "Switch on command state"
  36.  
  37.                     [Value : cUGetCommandState]
  38.                     {
  39.  
  40.                     }
  41.                     [Case *]
  42.                     {
  43.  
  44.                         [: cESCase]
  45.                         {
  46.                             Note = "0 - turnt to last known pos"
  47.                             Value = 0
  48.  
  49.                             [Procedures *]
  50.                             {
  51.  
  52.                                 [: cUStop]
  53.                                 {
  54.  
  55.                                     [Entity : cGetThisUnit]
  56.                                     {
  57.  
  58.                                     }
  59.                                 }
  60.                                 [: cUStopAim]
  61.                                 {
  62.  
  63.                                     [Entity : cGetThisUnit]
  64.                                     {
  65.  
  66.                                     }
  67.                                 }
  68.                                 [: cESSubrutine]
  69.                                 {
  70.                                     Subrutine = uSub.SMS_Turn
  71.  
  72.                                 }
  73.                                 [: cESIf]
  74.                                 {
  75.                                     Note = "Movement style change finished?"
  76.  
  77.                                     [Condition : cESCNumEquals]
  78.                                     {
  79.                                         Note = ""
  80.  
  81.                                         [Value1 : cUGetCommandSubState]
  82.                                         {
  83.  
  84.                                         }
  85.                                         [Value2 : cESFIntConst]
  86.                                         {
  87.                                             Value = -1
  88.  
  89.                                         }
  90.                                     }
  91.                                     [Then *]
  92.                                     {
  93.  
  94.                                         [: cESIntToVar]
  95.                                         {
  96.                                             VariableName = OriginalAngle
  97.                                             Keep = 1
  98.  
  99.                                             [Value : cUGetTurnAngle]
  100.                                             {
  101.  
  102.                                                 [Unit : cGetThisUnit]
  103.                                                 {
  104.  
  105.                                                 }
  106.                                             }
  107.                                         }
  108.                                         [: cESIf]
  109.                                         {
  110.                                             Note = ""
  111.  
  112.                                             [Condition : cMIsEmptyTarget]
  113.                                             {
  114.                                                 Note = ""
  115.  
  116.                                                 [Target : cUGetCommandTarget]
  117.                                                 {
  118.  
  119.                                                 }
  120.                                             }
  121.                                             [Then *]
  122.                                             {
  123.  
  124.                                                 [: cESLog]
  125.                                                 {
  126.                                                     Text = "Never seen any enemy."
  127.  
  128.                                                 }
  129.                                             }
  130.                                             [Else *]
  131.                                             {
  132.  
  133.                                                 [: cUTurnTo]
  134.                                                 {
  135.  
  136.                                                     [Target : cUGetCommandTarget]
  137.                                                     {
  138.  
  139.                                                     }
  140.                                                     [TurnToTarget : NULL]
  141.                                                     {
  142.  
  143.                                                     }
  144.                                                 }
  145.                                                 [: cESLog]
  146.                                                 {
  147.                                                     Text = "Turning to last known target position"
  148.  
  149.                                                 }
  150.                                             }
  151.                                         }
  152.                                         [: cUSetCommandState]
  153.                                         {
  154.  
  155.                                             [State : cESFIntConst]
  156.                                             {
  157.                                                 Value = 1
  158.  
  159.                                             }
  160.                                         }
  161.                                     }
  162.                                     [Else *]
  163.                                     {
  164.  
  165.                                     }
  166.                                 }
  167.                             }
  168.                         }
  169.                         [: cESCase]
  170.                         {
  171.                             Note = "1 - wait if neccessary"
  172.                             Value = 1
  173.  
  174.                             [Procedures *]
  175.                             {
  176.  
  177.                                 [: cESIf]
  178.                                 {
  179.                                     Note = ""
  180.  
  181.                                     [Condition : cUIsTurnCompleted]
  182.                                     {
  183.                                         Note = ""
  184.  
  185.                                     }
  186.                                     [Then *]
  187.                                     {
  188.  
  189.                                         [: cESIntToVar]
  190.                                         {
  191.                                             VariableName = Time
  192.                                             Keep = 1
  193.  
  194.                                             [Value : cESGetGlobalParameter]
  195.                                             {
  196.                                                 ParamName = time_looking_in_turnaround
  197.  
  198.                                             }
  199.                                         }
  200.                                         [: cUSetCommandState]
  201.                                         {
  202.  
  203.                                             [State : cESFIntConst]
  204.                                             {
  205.                                                 Value = 2
  206.  
  207.                                             }
  208.                                         }
  209.                                     }
  210.                                     [Else *]
  211.                                     {
  212.  
  213.                                     }
  214.                                 }
  215.                             }
  216.                         }
  217.                         [: cESCase]
  218.                         {
  219.                             Note = "2 - turn to 140 degrees"
  220.                             Value = 2
  221.  
  222.                             [Procedures *]
  223.                             {
  224.  
  225.                                 [: cESIntToVar]
  226.                                 {
  227.                                     VariableName = Time
  228.                                     Keep = 1
  229.  
  230.                                     [Value : cESFIntAdd]
  231.                                     {
  232.  
  233.                                         [Variable1 : cESFIntByVar]
  234.                                         {
  235.                                             VariableName = Time
  236.  
  237.                                         }
  238.                                         [Variable2 : cESFIntConst]
  239.                                         {
  240.                                             Value = -1
  241.  
  242.                                         }
  243.                                     }
  244.                                 }
  245.                                 [: cESIf]
  246.                                 {
  247.                                     Note = ""
  248.  
  249.                                     [Condition : cESCNumLess]
  250.                                     {
  251.                                         Note = ""
  252.  
  253.                                         [Value1 : cESFIntByVar]
  254.                                         {
  255.                                             VariableName = Time
  256.  
  257.                                         }
  258.                                         [Value2 : cESFIntConst]
  259.                                         {
  260.                                             Value = 0
  261.  
  262.                                         }
  263.                                     }
  264.                                     [Then *]
  265.                                     {
  266.  
  267.                                         [: cUTurnToAngle]
  268.                                         {
  269.  
  270.                                             [Angle : cESFIntAdd]
  271.                                             {
  272.  
  273.                                                 [Variable1 : cUGetTurnAngle]
  274.                                                 {
  275.  
  276.                                                     [Unit : cGetThisUnit]
  277.                                                     {
  278.  
  279.                                                     }
  280.                                                 }
  281.                                                 [Variable2 : cESFIntConst]
  282.                                                 {
  283.                                                     Value = 140
  284.  
  285.                                                 }
  286.                                             }
  287.                                         }
  288.                                         [: cESLog]
  289.                                         {
  290.                                             Text = "Turning to 140 degrees relatively"
  291.  
  292.                                         }
  293.                                         [: cUSetCommandState]
  294.                                         {
  295.  
  296.                                             [State : cESFIntConst]
  297.                                             {
  298.                                                 Value = 3
  299.  
  300.                                             }
  301.                                         }
  302.                                     }
  303.                                     [Else *]
  304.                                     {
  305.  
  306.                                     }
  307.                                 }
  308.                             }
  309.                         }
  310.                         [: cESCase]
  311.                         {
  312.                             Note = "3 - wait"
  313.                             Value = 3
  314.  
  315.                             [Procedures *]
  316.                             {
  317.  
  318.                                 [: cESIf]
  319.                                 {
  320.                                     Note = ""
  321.  
  322.                                     [Condition : cUIsTurnCompleted]
  323.                                     {
  324.                                         Note = ""
  325.  
  326.                                     }
  327.                                     [Then *]
  328.                                     {
  329.  
  330.                                         [: cESIntToVar]
  331.                                         {
  332.                                             VariableName = Time
  333.                                             Keep = 1
  334.  
  335.                                             [Value : cESGetGlobalParameter]
  336.                                             {
  337.                                                 ParamName = time_looking_in_turnaround
  338.  
  339.                                             }
  340.                                         }
  341.                                         [: cUSetCommandState]
  342.                                         {
  343.  
  344.                                             [State : cESFIntConst]
  345.                                             {
  346.                                                 Value = 4
  347.  
  348.                                             }
  349.                                         }
  350.                                     }
  351.                                     [Else *]
  352.                                     {
  353.  
  354.                                     }
  355.                                 }
  356.                             }
  357.                         }
  358.                         [: cESCase]
  359.                         {
  360.                             Note = "4 - turn to 80 degrees"
  361.                             Value = 4
  362.  
  363.                             [Procedures *]
  364.                             {
  365.  
  366.                                 [: cESIntToVar]
  367.                                 {
  368.                                     VariableName = Time
  369.                                     Keep = 1
  370.  
  371.                                     [Value : cESFIntAdd]
  372.                                     {
  373.  
  374.                                         [Variable1 : cESFIntByVar]
  375.                                         {
  376.                                             VariableName = Time
  377.  
  378.                                         }
  379.                                         [Variable2 : cESFIntConst]
  380.                                         {
  381.                                             Value = -1
  382.  
  383.                                         }
  384.                                     }
  385.                                 }
  386.                                 [: cESIf]
  387.                                 {
  388.                                     Note = ""
  389.  
  390.                                     [Condition : cESCNumLess]
  391.                                     {
  392.                                         Note = ""
  393.  
  394.                                         [Value1 : cESFIntByVar]
  395.                                         {
  396.                                             VariableName = Time
  397.  
  398.                                         }
  399.                                         [Value2 : cESFIntConst]
  400.                                         {
  401.                                             Value = 0
  402.  
  403.                                         }
  404.                                     }
  405.                                     [Then *]
  406.                                     {
  407.  
  408.                                         [: cUTurnToAngle]
  409.                                         {
  410.  
  411.                                             [Angle : cESFIntAdd]
  412.                                             {
  413.  
  414.                                                 [Variable1 : cUGetTurnAngle]
  415.                                                 {
  416.  
  417.                                                     [Unit : cGetThisUnit]
  418.                                                     {
  419.  
  420.                                                     }
  421.                                                 }
  422.                                                 [Variable2 : cESFIntConst]
  423.                                                 {
  424.                                                     Value = 80
  425.  
  426.                                                 }
  427.                                             }
  428.                                         }
  429.                                         [: cESLog]
  430.                                         {
  431.                                             Text = "Turning to 80 degrees relatively"
  432.  
  433.                                         }
  434.                                         [: cUSetCommandState]
  435.                                         {
  436.  
  437.                                             [State : cESFIntConst]
  438.                                             {
  439.                                                 Value = 5
  440.  
  441.                                             }
  442.                                         }
  443.                                     }
  444.                                     [Else *]
  445.                                     {
  446.  
  447.                                     }
  448.                                 }
  449.                             }
  450.                         }
  451.                         [: cESCase]
  452.                         {
  453.                             Note = "5 - wait"
  454.                             Value = 5
  455.  
  456.                             [Procedures *]
  457.                             {
  458.  
  459.                                 [: cESIf]
  460.                                 {
  461.                                     Note = ""
  462.  
  463.                                     [Condition : cUIsTurnCompleted]
  464.                                     {
  465.                                         Note = ""
  466.  
  467.                                     }
  468.                                     [Then *]
  469.                                     {
  470.  
  471.                                         [: cESIntToVar]
  472.                                         {
  473.                                             VariableName = Time
  474.                                             Keep = 1
  475.  
  476.                                             [Value : cESGetGlobalParameter]
  477.                                             {
  478.                                                 ParamName = time_looking_in_turnaround
  479.  
  480.                                             }
  481.                                         }
  482.                                         [: cUSetCommandState]
  483.                                         {
  484.  
  485.                                             [State : cESFIntConst]
  486.                                             {
  487.                                                 Value = 6
  488.  
  489.                                             }
  490.                                         }
  491.                                     }
  492.                                     [Else *]
  493.                                     {
  494.  
  495.                                     }
  496.                                 }
  497.                             }
  498.                         }
  499.                         [: cESCase]
  500.                         {
  501.                             Note = "6 - turning back to original angle."
  502.                             Value = 6
  503.  
  504.                             [Procedures *]
  505.                             {
  506.  
  507.                                 [: cESIntToVar]
  508.                                 {
  509.                                     VariableName = Time
  510.                                     Keep = 1
  511.  
  512.                                     [Value : cESFIntAdd]
  513.                                     {
  514.  
  515.                                         [Variable1 : cESFIntByVar]
  516.                                         {
  517.                                             VariableName = Time
  518.  
  519.                                         }
  520.                                         [Variable2 : cESFIntConst]
  521.                                         {
  522.                                             Value = -1
  523.  
  524.                                         }
  525.                                     }
  526.                                 }
  527.                                 [: cESIf]
  528.                                 {
  529.                                     Note = ""
  530.  
  531.                                     [Condition : cESCNumLess]
  532.                                     {
  533.                                         Note = ""
  534.  
  535.                                         [Value1 : cESFIntByVar]
  536.                                         {
  537.                                             VariableName = Time
  538.  
  539.                                         }
  540.                                         [Value2 : cESFIntConst]
  541.                                         {
  542.                                             Value = 0
  543.  
  544.                                         }
  545.                                     }
  546.                                     [Then *]
  547.                                     {
  548.  
  549.                                         [: cUTurnToAngle]
  550.                                         {
  551.  
  552.                                             [Angle : cESFIntByVar]
  553.                                             {
  554.                                                 VariableName = OriginalAngle
  555.  
  556.                                             }
  557.                                         }
  558.                                         [: cESLog]
  559.                                         {
  560.                                             Text = "Turning back to original angle"
  561.  
  562.                                         }
  563.                                         [: cUSetCommandState]
  564.                                         {
  565.  
  566.                                             [State : cESFIntConst]
  567.                                             {
  568.                                                 Value = 7
  569.  
  570.                                             }
  571.                                         }
  572.                                     }
  573.                                     [Else *]
  574.                                     {
  575.  
  576.                                     }
  577.                                 }
  578.                             }
  579.                         }
  580.                         [: cESCase]
  581.                         {
  582.                             Note = "7"
  583.                             Value = 7
  584.  
  585.                             [Procedures *]
  586.                             {
  587.  
  588.                                 [: cESIf]
  589.                                 {
  590.                                     Note = ""
  591.  
  592.                                     [Condition : cUIsTurnCompleted]
  593.                                     {
  594.                                         Note = ""
  595.  
  596.                                     }
  597.                                     [Then *]
  598.                                     {
  599.  
  600.                                         [: cESLog]
  601.                                         {
  602.                                             Text = "Turn finished. Command Complete."
  603.  
  604.                                         }
  605.                                         [: cUCommandCompleted]
  606.                                         {
  607.  
  608.                                         }
  609.                                     }
  610.                                     [Else *]
  611.                                     {
  612.  
  613.                                     }
  614.                                 }
  615.                             }
  616.                         }
  617.                     }
  618.                 }
  619.             }
  620.             [Else *]
  621.             {
  622.  
  623.             }
  624.         }
  625.     }
  626. }
  627.