• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

scorcher earth

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
how can I make this spell lasts 10 seconds?
here it is:

  • Scorched Earth
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fan of Knives
    • Actions
      • Set ScorchedEarth_Trig_Unit = (Triggering unit)
      • Set Damage[1] = 1500.00
      • Set Damage[2] = (1000.00 x ((Real((Agility of ScorchedEarth_Trig_Unit (Include bonuses)))) / 100.00))
      • Set Damage_Integer = (Level of Fan of Knives for ScorchedEarth_Trig_Unit)
      • Trigger - Turn on Scorched Earth Loop <gen>
and the loop

  • Scorched Earth Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Point = (Position of ScorchedEarth_Trig_Unit)
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Set FirePoint = (Temp_Point offset by 100.00 towards (18.00 + (72.00 x (Real((Integer A))))) degrees)
          • Special Effect - Create a special effect at FirePoint using Environment\SmallBuildingFire\SmallBuildingFire2.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_FirePoint)
      • For each (Integer A) from 6 to 15, do (Actions)
        • Loop - Actions
          • Set FirePoint = (Temp_Point offset by 250.00 towards (54.00 + (36.00 x (Real((Integer A))))) degrees)
          • Special Effect - Create a special effect at FirePoint using Environment\SmallBuildingFire\SmallBuildingFire2.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_FirePoint)
      • For each (Integer A) from 16 to 35, do (Actions)
        • Loop - Actions
          • Set FirePoint = (Temp_Point offset by 500.00 towards (72.00 + (18.00 x (Real((Integer A))))) degrees)
          • Special Effect - Create a special effect at FirePoint using Environment\SmallBuildingFire\SmallBuildingFire2.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_FirePoint)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Set Unit_Group = (Units within 500.00 of (Position of ScorchedEarth_Trig_Unit))
          • Unit Group - Pick every unit in Unit_Group and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (((Picked unit) belongs to an enemy of (Owner of Trig_Unit)) Equal to True) and ((((Picked unit) is alive) Equal to True) and (((Picked unit) is dead) Equal to False))
                • Then - Actions
                  • Unit - Cause ScorchedEarth_Trig_Unit to damage (Picked unit), dealing Damage[Damage_Integer] damage of attack type Spells and damage type Normal
                  • Custom script: call DestroyGroup(udg_Unit_Group)
                • Else - Actions
        • Else - Actions
          • Custom script: call RemoveLocation(udg_Temp_Point)
 
Well, since you don't want multi-unit instanceability,
create an integer variable and
  • Set Duration = 10
(Scorched Earth trigger)

then, in the Scorched Earth Loop trigger,

  • If (All conditions are true) then do (Actions) else do (Actions)
    • If - Conditions
      • Duration Greater than 0
    • Then - Actions
      • Set Duration = (Duration - 1)
      • //Rest of the trigger here
    • Else - Actions
      • Trigger - Turn off (This trigger)
• Custom script: call DestroyGroup(udg_Unit_Group)

Move this out of the Unit Group - Action, aligned with the Set Unit_Group action.

• Custom script: call RemoveLocation(udg_Temp_Point)

Move this out of the If/Then/Else statement, in the end of the trigger.
 
Status
Not open for further replies.
Top