Author Topic: Special Attacks  (Read 3573 times)

StrikerShot21

  • Guest
Special Attacks
« on: 3 January 2005, 00:31:10 »
What is wrong with this code?

<?xml version="1.0" standalone="no"?>

<unit>

   <!-- *** PARAMETERS *** -->

   <parameters>
      <size value="1"/>
      <height value="3"/>
      <max-hp value="500" regeneration="0"/>
      <max-ep value="0"/>
      <armor value="20"/>   
      <armor-type value="Steel"/>            
      <sight value="15"/>
      <time value="60"/>   
      <multi-selection value="true"/>   
      <cellmap value="false"/>
      <levels>
         <level name="Elite" kills="5"/>
      </levels>
      <fields>
         <field value="land"/>
         <field value="air"/>
      </fields>   
      <properties/>
      <light enabled="false"/>
      <unit-requirements>
         <unit name="War Factory"/>
         <unit name="Advanced Weapons Lab"/>
      </unit-requirements>
      <upgrade-requirements/>
      <resource-requirements>
         <resource name="Gold" amount="100"/>            
      </resource-requirements>
      <resources-stored/>
      <image path="images/archer.bmp"/>
      <image-cancel path="images/tech_cancel.bmp"/>
      <meeting-point value="false"/>
      <selection-sounds enabled="true">
         <sound path="sounds/archer_select1.wav"/>
         <sound path="sounds/archer_select2.wav"/>
         <sound path="sounds/archer_select3.wav"/>
         <sound path="sounds/archer_select4.wav"/>
         <sound path="sounds/archer_select5.wav"/>
         <sound path="sounds/archer_select6.wav"/>
         <sound path="sounds/archer_select7.wav"/>
         <sound path="sounds/archer_select8.wav"/>
         <sound path="sounds/archer_select9.wav"/>
         <sound path="sounds/archer_select10.wav"/>
         <sound path="sounds/archer_select11.wav"/>

      </selection-sounds>
      <command-sounds enabled="true">
         <sound path="sounds/archer_ack1.wav"/>
         <sound path="sounds/archer_ack2.wav"/>
         <sound path="sounds/archer_ack3.wav"/>
         <sound path="sounds/archer_ack4.wav"/>
         <sound path="sounds/archer_ack5.wav"/>
         <sound path="sounds/archer_ack6.wav"/>
         <sound path="sounds/archer_ack7.wav"/>
         <sound path="sounds/archer_ack8.wav"/>
         <sound path="sounds/archer_ack9.wav"/>
         <sound path="sounds/archer_ack10.wav"/>
         <sound path="sounds/archer_ack11.wav"/>
         <sound path="sounds/archer_ack12.wav"/>
         <sound path="sounds/archer_ack13.wav"/>
         <sound path="sounds/archer_ack14.wav"/>
         <sound path="sounds/archer_ack15.wav"/>
      </command-sounds>
   </parameters>


   <!-- *** SKILLS *** -->

   <skills>
   
      <skill>
         <type value="stop"/>
         <name value="Stop Skill"/>      
         <ep-cost value="0"/>
         <speed value="1000"/>
         <anim-speed value="45"/>
         <animation path="models/Mammoth Tank.g3d"/>
         <sound enabled="false"/>
      </skill>
      
      <skill>
         <type value="move"/>
         <name value="Move Skill"/>      
         <ep-cost value="0"/>
         <speed value="220"/>
         <anim-speed value="150"/>
         <animation path="models/Mammoth Tank.g3d"/>
         <sound enabled="false"/>
      </skill>

      <skill>
         <type value="attack"/>
         <name value="Attack Skill"/>      
         <ep-cost value="0"/>
         <speed value="50"/>
         <anim-speed value="50"/>
         <animation path="models/Mammoth Tank.g3d"/>
         <sound enabled="true" start-time="0.5">
            <sound-file path="/sounds/archer_attack1.wav"/>
            <sound-file path="/sounds/archer_attack2.wav"/>
            <sound-file path="/sounds/archer_attack3.wav"/>
            <sound-file path="/sounds/archer_attack4.wav"/>
         </sound>
         <attack-strenght value="100"/>
         <attack-var value="0"/>
         <attack-range value="10"/>
         <attack-type value="Cannon"/>
         <attack-start-time value="0.5"/>
         <attack-fields>
            <field value="land"/>
            <field value="air"/>
         </attack-fields>
         <projectile value="true">
            <particle value="true" path="Particle_Proj.xml"/>
            <sound enabled="true">
               <sound-file path="/sounds/arrow_hit1.wav"/>
               <sound-file path="/sounds/arrow_hit2.wav"/>
               <sound-file path="/sounds/arrow_hit3.wav"/>
               <sound-file path="/sounds/arrow_hit4.wav"/>
               <sound-file path="/sounds/arrow_hit5.wav"/>
            </sound>
         </projectile>
         <splash value="false"/>
      </skill>

      <skill>
         <type value="attack"/>
         <name value="Missle Skill"/>      
         <ep-cost value="0"/>
         <speed value="25"/>
         <anim-speed value="50"/>
         <animation path="models/Mammoth Tank.g3d"/>
         <sound enabled="true" start-time="0.5">
            <sound-file path="/sounds/archer_attack1.wav"/>
            <sound-file path="/sounds/archer_attack2.wav"/>
            <sound-file path="/sounds/archer_attack3.wav"/>
            <sound-file path="/sounds/archer_attack4.wav"/>
         </sound>
         <attack-strenght value="150"/>
         <attack-var value="0"/>
         <attack-range value="15"/>
         <attack-type value="Missle"/>
         <attack-start-time value="0.5"/>
         <attack-fields>
            <field value="land"/>
            <field value="air"/>
         </attack-fields>
         <projectile value="true">
            <particle value="true" path="Particle_Proj.xml"/>
            <sound enabled="true">
               <sound-file path="/sounds/arrow_hit1.wav"/>
               <sound-file path="/sounds/arrow_hit2.wav"/>
               <sound-file path="/sounds/arrow_hit3.wav"/>
               <sound-file path="/sounds/arrow_hit4.wav"/>
               <sound-file path="/sounds/arrow_hit5.wav"/>
            </sound>
         </projectile>
         <splash value="false"/>
      </skill>

      <skill>
         <type value="attack"/>
         <name value="Mini-Turrets Skill"/>      
         <ep-cost value="0"/>
         <speed value="100"/>
         <anim-speed value="50"/>
         <animation path="models/Mammoth Tank.g3d"/>
         <sound enabled="true" start-time="0.5">
            <sound-file path="/sounds/archer_attack1.wav"/>
            <sound-file path="/sounds/archer_attack2.wav"/>
            <sound-file path="/sounds/archer_attack3.wav"/>
            <sound-file path="/sounds/archer_attack4.wav"/>
         </sound>
         <attack-strenght value="75"/>
         <attack-var value="0"/>
         <attack-range value="10"/>
         <attack-type value="Bullets"/>
         <attack-start-time value="0.5"/>
         <attack-fields>
            <field value="land"/>
            <field value="air"/>
         </attack-fields>
         <projectile value="true">
            <particle value="true" path="Particle_Proj.xml"/>
            <sound enabled="true">
               <sound-file path="/sounds/arrow_hit1.wav"/>
               <sound-file path="/sounds/arrow_hit2.wav"/>
               <sound-file path="/sounds/arrow_hit3.wav"/>
               <sound-file path="/sounds/arrow_hit4.wav"/>
               <sound-file path="/sounds/arrow_hit5.wav"/>
            </sound>
         </projectile>
         <splash value="false"/>
      </skill>      
      <skill>
         <type value="die"/>
         <name value="Die Skill"/>      
         <ep-cost value="0"/>
         <speed value="60"/>
         <anim-speed value="60"/>
         <animation path="models/Mammoth Tank.g3d"/>
         <sound enabled="true" start-time="0">
            <sound-file path="sounds/archer_die1.wav"/>
            <sound-file path="sounds/archer_die2.wav"/>
            <sound-file path="sounds/archer_die3.wav"/>
            <sound-file path="sounds/archer_die4.wav"/>
         </sound>
      </skill>


   </skills>

   <!-- *** COMMANDS *** -->
   
   <commands>
      
      <command>
         <type value= "stop"/>
         <name value="Stop"/>
         <image path="images/tech_stop.bmp"/>
         <unit-requirements/>
         <upgrade-requirements/>
         <stop-skill value="Stop Skill"/>
      </command>

      <command>
         <type value= "move"/>
         <name value="Move"/>
         <image path="images/tech_move.bmp"/>
         <unit-requirements/>
         <upgrade-requirements/>
         <move-skill value="Move Skill"/>
      </command>

      <command>
         <type value= "attack"/>
         <name value="Attack"/>
         <image path="images/archer_attack.bmp"/>
         <unit-requirements/>
         <upgrade-requirements/>
         <move-skill value="Move Skill"/>
         <attack-skill value="Attack Skill"/>
      </command>
      
      <command>
         <type value="attack_stopped"/>
         <name value="Hold Position"/>
         <image path="images/tech_hold.bmp"/>
         <unit-requirements/>
         <upgrade-requirements>
            <upgrade name="Training_field"/>
         </upgrade-requirements>
         <stop-skill value="Stop Skill"/>
         <attack-skill value="Attack Skill"/>
      </command>
   </commands>
</unit>

For some reason, I am only able to use the basic attack, not the others.
« Last Edit: 1 January 1970, 00:00:00 by StrikerShot21 »

martiño

  • Behemoth
  • *******
  • Posts: 1,095
    • View Profile
(No subject)
« Reply #1 on: 3 January 2005, 21:41:24 »
because there is only one attack command, you have to make one attack command for each attack skill
« Last Edit: 1 January 1970, 00:00:00 by martiño »

StrikerShot21

  • Guest
(No subject)
« Reply #2 on: 3 January 2005, 22:43:52 »
Oh ok, thanks!
« Last Edit: 1 January 1970, 00:00:00 by StrikerShot21 »

 

anything