• 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.

Fiery Rock v 1.2a

Fiery Rock
Summons a fiery rock that deals fire damage to an enemy units close to it. Also destroys destructibles.
damage: 20/40/60
lasts: 5/10/15 sec
Cast Range: 100/200/300
AoE: 300/600/900

HOW TO IMPORT:
Just copy the triggers, the variables and the dummy unit into your map.

Please give credits to me if you use this spell in your map.

thanks,
eubz

  • FR init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ====================================================== --------
      • -------- YOU CAN SET ALL THESE --------
      • -------- set the damage, the time, the AoE, and the cast range of the spell --------
      • Set FR_Damage = 20.00
      • Set FR_Time = 5.00
      • Set FR_AoE = 300.00
      • Set FR_CastRange = 100.00
      • -------- set the attachment points --------
      • Set FR_Target_SEff_Attachment = overhead
      • Set FR_Caster_SEffects_Attachment = origin
      • -------- set the special effect model path --------
      • Set FR_Target_SEff = Abilities\Spells\Human\FlameStrike\FlameStrikeEmbers.mdl
      • Set FR_Rock_SEff_01 = Abilities\Spells\Orc\LiquidFire\Liquidfire.mdl
      • Set FR_Rock_SEff_02 = Doodads\Dungeon\Rocks\DungeonRock\DungeonRock0.mdl
      • Set FR_Rock_SEff_03 = Abilities\Spells\Items\VampiricPotion\VampPotionCaster.mdl
      • Set FR_Caster_SEff_01 = Abilities\Spells\Other\Volcano\VolcanoDeath.mdl
      • Set FR_Caster_SEff_02 = Abilities\Spells\Other\Doom\DoomDeath.mdl
      • -------- ====================================================== --------
  • FR cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Hit
    • Actions
      • -------- ====================================================== --------
      • -------- DO NOT TRY TO CONFIGURE ANYTHING BELOW --------
      • -------- increasing the endix size --------
      • Set FR_size = (FR_size + 1)
      • -------- endixing --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FR_size Greater than FR_max_size
        • Then - Actions
          • Set FR_index[FR_size] = FR_size
          • Set FR_max_size = FR_size
        • Else - Actions
      • Set FR_integer = FR_index[FR_size]
      • -------- done endixing --------
      • -------- ====================================================== --------
      • -------- setting up the spell --------
      • Set FR_Caster[FR_integer] = (Triggering unit)
      • Set FR_Caster_Pos = (Position of FR_Caster[FR_integer])
      • Set FR_CasterAbilLevel = (Real((Level of Hit for FR_Caster[FR_integer])))
      • Set FR_AoE_Real[FR_integer] = (FR_AoE x FR_CasterAbilLevel)
      • Set FR_Real_Time[FR_integer] = (FR_Time x FR_CasterAbilLevel)
      • Set FR_Real_Damage[FR_integer] = (FR_Damage x FR_CasterAbilLevel)
      • Set FR_Real_CastRange[FR_integer] = (FR_CastRange x FR_CasterAbilLevel)
      • Set FR_DummyCreatorPos = (FR_Caster_Pos offset by FR_Real_CastRange[FR_integer] towards (Facing of FR_Caster[FR_integer]) degrees)
      • Unit - Create 1 dummy for (Owner of FR_Caster[FR_integer]) at FR_DummyCreatorPos facing Default building facing degrees
      • Set FR_dummy[FR_integer] = (Last created unit)
      • Unit - Turn collision for FR_dummy[FR_integer] Off
      • -------- getting all the special effects at the start of the spell work here --------
      • Special Effect - Create a special effect attached to the FR_Caster_SEffects_Attachment of FR_Caster[FR_integer] using FR_Caster_SEff_01
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the FR_Caster_SEffects_Attachment of FR_Caster[FR_integer] using FR_Caster_SEff_02
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at FR_DummyCreatorPos using FR_Rock_SEff_01
      • Set FR_SEffect_1[FR_integer] = (Last created special effect)
      • Special Effect - Create a special effect at FR_DummyCreatorPos using FR_Rock_SEff_02
      • Set FR_SEffect_2[FR_integer] = (Last created special effect)
      • Special Effect - Create a special effect at FR_DummyCreatorPos using FR_Rock_SEff_03
      • Set FR_SEffect_3[FR_integer] = (Last created special effect)
      • -------- eliminating leaks after they are used up --------
      • Custom script: call RemoveLocation(udg_FR_Caster_Pos)
      • Custom script: call RemoveLocation(udg_FR_DummyCreatorPos)
      • -------- turning on the duration of the spell --------
      • Trigger - Turn on FR Duration <gen>
      • -------- ====================================================== --------
  • FR Duration
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • -------- ====================================================== --------
      • -------- DO NOT TRY TO CONFIGURE ANYTHING BELOW --------
      • For each (Integer FR_loop) from 1 to FR_size, do (Actions)
        • Loop - Actions
          • Set FR_integer = FR_index[FR_loop]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FR_Real_Time[FR_integer] Equal to 0.00
            • Then - Actions
              • Special Effect - Destroy FR_SEffect_1[FR_integer]
              • Special Effect - Destroy FR_SEffect_2[FR_integer]
              • Special Effect - Destroy FR_SEffect_3[FR_integer]
              • Unit - Kill FR_dummy[FR_integer]
              • Unit - Remove FR_dummy[FR_integer] from the game
              • Set FR_index[FR_loop] = FR_index[FR_size]
              • Set FR_index[FR_size] = FR_integer
              • Set FR_size = (FR_size - 1)
              • Set FR_loop = (FR_loop - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • FR_size Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
              • Set FR_Caster_Pos = (Position of FR_Caster[FR_integer])
              • Set FR_dummy_loc = (Position of FR_dummy[FR_integer])
              • Set FR_Real_Time[FR_integer] = (FR_Real_Time[FR_integer] - 1.00)
              • Set FR_TargetGroup = (Units within FR_AoE_Real[FR_integer] of FR_dummy_loc matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy
              • Unit Group - Pick every unit in FR_TargetGroup and do (Actions)
                • Loop - Actions
                  • Set FR_Target_u[FR_integer] = (Picked unit)
                  • Unit - Cause FR_Caster[FR_integer] to damage FR_Target_u[FR_integer], dealing FR_Real_Damage[FR_integer] damage of attack type Spells and damage type Normal
                  • Special Effect - Create a special effect attached to the FR_Target_SEff_Attachment of (Picked unit) using FR_Target_SEff
                  • Special Effect - Destroy (Last created special effect)
              • -------- clearing up leaks --------
              • Custom script: call DestroyGroup(udg_FR_TargetGroup)
              • Custom script: call RemoveLocation(udg_FR_Caster_Pos)
              • Custom script: call RemoveLocation(udg_FR_dummy_loc)
              • -------- ====================================================== --------

Keywords:
fire, fiery, rock, lava, eubz
Contents

FR (Map)

Reviews
22:13, 21st Jul 2012 Magtheridon96: Approved. This is a pretty good spell, and although the idea is not something that blows my mind, it's still something you don't see everyday. :P

Moderator

M

Moderator

22:13, 21st Jul 2012
Magtheridon96: Approved.

This is a pretty good spell, and although the idea is not something that blows my mind, it's still something you don't see everyday. :p
 
Instead of setting the group outside of the if statement, set it inside the else block because you don't need it inside the 'Then' block. You can do the same for Caster_Pos and dummy_loc.
But note: you would have to destroy them in the same block that you are creating them, so move their respective "DestroyGroup" and "RemoveLocation" calls to the else block.

Also, you should cache (Real((Level of Hit for FR_Caster[FR_integer])))

And this leaks:
Unit - Create 1 dummy for (Owner of FR_Caster[FR_integer]) at (FR_Caster_Pos offset by FR_Real_CastRange[FR_integer] towards (Facing of FR_Caster[FR_integer]) degrees) facing Default building facing degrees

You should store the location in a variable and remove it.


Excellent indexing by the way.
 
In the cast trigger, you don't need dummy_loc, use DummyCreatorPos.
They will point to the same location.

Also:

  • Set FR_Caster_Pos = (Position of FR_Caster[FR_integer])
  • Set FR_dummy_loc = (Position of FR_dummy[FR_integer])
and
  • Custom script: call RemoveLocation(udg_FR_Caster_Pos)
  • Custom script: call RemoveLocation(udg_FR_dummy_loc)
should be moved to the Else block since you have no use for them if "Then" actions are executed.
 
Which else action, here?
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • FR_size Equal to 0
  • Then - Actions
  • Trigger - Turn off (This trigger)
  • Else - Actions
Or here?

  • Else - Actions
  • Set FR_Real_Time[FR_integer] = (FR_Real_Time[FR_integer] - 1.00)
  • Set FR_TargetGroup = (Units within FR_AoE_Real[FR_integer] of FR_dummy_loc matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy
  • Unit Group - Pick every unit in FR_TargetGroup and do (Actions)
  • Loop - Actions
  • Set FR_Target_u[FR_integer] = (Picked unit)
  • Unit - Cause FR_Caster[FR_integer] to damage FR_Target_u[FR_integer], dealing FR_Real_Damage[FR_integer] damage of attack type Spells and damage type Normal
  • Special Effect - Create a special effect attached to the FR_Target_SEff_Attachment of (Picked unit) using FR_Target_SEff
  • Special Effect - Destroy (Last created special effect)
  • -------- clearing up leaks --------
  • Custom script: call DestroyGroup(udg_FR_TargetGroup)
  • Custom script: call RemoveLocation(udg_FR_Caster_Pos)
  • Custom script: call RemoveLocation(udg_FR_dummy_loc)
 
then, the two are already inside the else actions.
  • Else - Actions
    • Set FR_Real_Time[FR_integer] = (FR_Real_Time[FR_integer] - 1.00)
    • Set FR_TargetGroup = (Units within FR_AoE_Real[FR_integer] of FR_dummy_loc matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy
    • Unit Group - Pick every unit in FR_TargetGroup and do (Actions)
      • Loop - Actions
        • Set FR_Target_u[FR_integer] = (Picked unit)
        • Unit - Cause FR_Caster[FR_integer] to damage FR_Target_u[FR_integer], dealing FR_Real_Damage[FR_integer] damage of attack type Spells and damage type Normal
        • Special Effect - Create a special effect attached to the FR_Target_SEff_Attachment of (Picked unit) using FR_Target_SEff
        • Special Effect - Destroy (Last created special effect)
    • -------- clearing up leaks --------
    • Custom script: call DestroyGroup(udg_FR_TargetGroup)
    • Custom script: call RemoveLocation(udg_FR_Caster_Pos)
    • Custom script: call RemoveLocation(udg_FR_dummy_loc)
    • -------- ====================================================== -------
Clearing up leaks is now under the Unit Group action, after its loop actions.
EDIT:
Oops, sorry mag, I haven't figured out. editing the spell again.
thanks.
 
This is how it should be:

  • FR Duration
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • -------- ====================================================== --------
      • -------- DO NOT TRY TO CONFIGURE ANYTHING BELOW --------
      • For each (Integer FR_loop) from 1 to FR_size, do (Actions)
        • Loop - Actions
          • Set FR_integer = FR_index[FR_loop]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FR_Real_Time[FR_integer] Equal to 0.00
            • Then - Actions
              • Special Effect - Destroy FR_SEffect_1[FR_integer]
              • Special Effect - Destroy FR_SEffect_2[FR_integer]
              • Special Effect - Destroy FR_SEffect_3[FR_integer]
              • Unit - Kill FR_dummy[FR_integer]
              • Unit - Remove FR_dummy[FR_integer] from the game
              • Set FR_index[FR_loop] = FR_index[FR_size]
              • Set FR_index[FR_size] = FR_integer
              • Set FR_size = (FR_size - 1)
              • Set FR_loop = (FR_loop - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • FR_size Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
              • Set FR_Real_Time[FR_integer] = (FR_Real_Time[FR_integer] - 1.00)
              • Set FR_Caster_Pos = (Position of FR_Caster[FR_integer])
              • Set FR_dummy_loc = (Position of FR_dummy[FR_integer])
              • Set FR_TargetGroup = (Units within FR_AoE_Real[FR_integer] of FR_dummy_loc matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy
              • Unit Group - Pick every unit in FR_TargetGroup and do (Actions)
                • Loop - Actions
                  • Set FR_Target_u[FR_integer] = (Picked unit)
                  • Unit - Cause FR_Caster[FR_integer] to damage FR_Target_u[FR_integer], dealing FR_Real_Damage[FR_integer] damage of attack type Spells and damage type Normal
                  • Special Effect - Create a special effect attached to the FR_Target_SEff_Attachment of (Picked unit) using FR_Target_SEff
                  • Special Effect - Destroy (Last created special effect)
              • -------- clearing up leaks --------
              • Custom script: call DestroyGroup(udg_FR_TargetGroup)
              • Custom script: call RemoveLocation(udg_FR_Caster_Pos)
              • Custom script: call RemoveLocation(udg_FR_dummy_loc)
              • -------- ====================================================== -------
Because currently, if the "Then" actions are executed, this leaks.
 
Top