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

Rapid Firebolt v7.0

  • Like
Reactions: ILH

Rapid Firebolt[TD]v7.0
  • Index

    1. Description
    2. Screenshot
    3. Code/Trigger
    4. Last Message
    5. Changelog

  • Description

    Fires several firebolts at targeted location that causes damage in radius of 150 when reach the distance.

    Level 1 - 6 firebolts, 80 damage per firebolt.
    Level 2 - 7 firebolts, 100 damage per firebolt.
    Level 3 - 8 firebolts, 120 damage per firebolt.
    Level 4 - 10 firebolts, 140 damage per firebolt.
  • Screenshot

    Rapid%20Firebolt2.jpg

    Rapid%20Firebolt3.jpg

    Rapid%20Firebolt4.jpg

  • Code/Trigger

    • Rapid Firebolt Setting
      • Events
        • Map initialization
      • Conditions
      • Actions
        • -------- --------------------------- --------
        • -------- IMPORTANT VARIABLES --------
        • -------- --------------------------- --------
        • -------- Determines the ability --------
        • Set RF_Ability = Rapid Firebolt
        • -------- --------------------------- --------
        • -------- Determines the order string --------
        • -------- This must be equal to the ability Order String - Use/Turn On in Object Editor --------
        • Set RF_OrderId = (Order(flamestrike))
        • -------- --------------------------- --------
        • -------- Determines the firebolt dummy --------
        • Set RF_FireboltMissile = Firebolt Missile
        • -------- --------------------------- --------
        • -------- Determines the range from targeted point where the firebolt will set as its target point --------
        • -------- Array is the level [Number] --------
        • Set RF_AoE[1] = 200.00
        • Set RF_AoE[2] = 200.00
        • Set RF_AoE[3] = 200.00
        • Set RF_AoE[4] = 200.00
        • -------- --------------------------- --------
        • -------- Determines the number of firebolt fired each cast --------
        • -------- Array is the level [Number] --------
        • Set RF_FireboltNumber[1] = 6
        • Set RF_FireboltNumber[2] = 7
        • Set RF_FireboltNumber[3] = 8
        • Set RF_FireboltNumber[4] = 9
        • -------- --------------------------- --------
        • -------- Determines the firebolt spawn interval --------
        • -------- Array is the level [Number] --------
        • Set RF_FireboltSpawnInterval[1] = 0.12
        • Set RF_FireboltSpawnInterval[2] = 0.12
        • Set RF_FireboltSpawnInterval[3] = 0.12
        • Set RF_FireboltSpawnInterval[4] = 0.12
        • -------- --------------------------- --------
        • -------- Determines firebolt height when its spawn --------
        • -------- Array is the level [Number] --------
        • Set RF_FireboltSpawnHeight[1] = 100.00
        • Set RF_FireboltSpawnHeight[2] = 100.00
        • Set RF_FireboltSpawnHeight[3] = 100.00
        • Set RF_FireboltSpawnHeight[4] = 100.00
        • -------- --------------------------- --------
        • -------- Firebolt travel by speed? else travel by time --------
        • Set RF_TravelBySpeed = False
        • -------- --------------------------- --------
        • -------- Determines the firebolt travel time --------
        • -------- Requires RF_TravelBySpeed = False --------
        • -------- Array is the level [Number] --------
        • Set RF_FireboltTravelSpeed[1] = 0.00
        • Set RF_FireboltTravelSpeed[2] = 0.00
        • Set RF_FireboltTravelSpeed[3] = 0.00
        • Set RF_FireboltTravelSpeed[4] = 0.00
        • -------- --------------------------- --------
        • -------- Determines the firebolt travel speed --------
        • -------- Requires RF_TravelBySpeed = True --------
        • -------- Array is the level [Number] --------
        • Set RF_FireboltTravelTime[1] = 0.50
        • Set RF_FireboltTravelTime[2] = 0.50
        • Set RF_FireboltTravelTime[3] = 0.50
        • Set RF_FireboltTravelTime[4] = 0.50
        • -------- --------------------------- --------
        • -------- Determines the firebolt explosion effects --------
        • -------- Array is the number of firebolt explosion [Number] --------
        • Set RF_ExplosionEffect[1] = Abilities\Spells\Other\Doom\DoomDeath.mdl
        • Set RF_ExplosionEffect[2] = Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
        • Set RF_ExplosionEffect[3] = Abilities\Spells\Other\Volcano\VolcanoDeath.mdl
        • -------- --------------------------- --------
        • -------- Determines the number of firebolt explosion will be created --------
        • Set RF_ExplosionEffectNumber = 3
        • -------- --------------------------- --------
        • -------- Determines the damage dealt by the firebolt explosion --------
        • -------- Array is the level [Number] --------
        • Set RF_Damage[1] = 80.00
        • Set RF_Damage[2] = 100.00
        • Set RF_Damage[3] = 120.00
        • Set RF_Damage[4] = 140.00
        • -------- --------------------------- --------
        • -------- Determines the damage radius --------
        • -------- Array is the level [Number] --------
        • Set RF_DamageRadius[1] = 150.00
        • Set RF_DamageRadius[2] = 150.00
        • Set RF_DamageRadius[3] = 150.00
        • Set RF_DamageRadius[4] = 150.00
        • -------- --------------------------- --------
        • -------- Determines the attack-type --------
        • Set RF_AttackType = Siege
        • -------- --------------------------- --------
        • -------- Determines the damage-type --------
        • Set RF_DamageType = Fire
        • -------- --------------------------- --------
        • -------- Firebolt explosion destroy nearby trees? --------
        • Set RF_DestroyTrees = True
        • -------- =========================================================================== --------
        • Set RF_TempLoc = (Point(0.00, 0.00))
        • Unit - Create 1 Peasant for Neutral Passive at RF_TempLoc facing 0.00 degrees
        • Set RF_Harvester = (Last created unit)
        • Custom script: call UnitAddAbility(udg_RF_Harvester,'Aloc')
        • Unit - Hide RF_Harvester
        • Custom script: call RemoveLocation(udg_RF_TempLoc)
        • Set RF_HarvestOrderId = (Order(harvest))
    • Rapid Firebolt Cast
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to RF_Ability
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • RF_MaxIndex Equal to 0
          • Then - Actions
            • Trigger - Turn on Rapid Firebolt Loop <gen>
          • Else - Actions
        • Set RF_MaxIndex = (RF_MaxIndex + 1)
        • Set RF_Caster[RF_MaxIndex] = (Triggering unit)
        • Set RF_Level[RF_MaxIndex] = (Level of RF_Ability for RF_Caster[RF_MaxIndex])
        • Set RF_FireboltCount[RF_MaxIndex] = RF_FireboltNumber[RF_Level[RF_MaxIndex]]
        • Set RF_CasterPosition[RF_MaxIndex] = (Position of RF_Caster[RF_MaxIndex])
        • Set RF_TargetPoint[RF_MaxIndex] = (Target point of ability being cast)
        • Set RF_rTimer[RF_MaxIndex] = 0.00
        • Set RF_StageId[RF_MaxIndex] = 2
    • Rapid Firebolt Loop
      • Events
        • Time - Every 0.03 seconds of game time
      • Conditions
      • Actions
        • For each (Integer RF_Index) from 1 to RF_MaxIndex, do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • RF_StageId[RF_Index] Equal to 1
              • Then - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • RF_Distance[RF_Index] Greater than 0.00
                  • Then - Actions
                    • Custom script: set udg_RF_X=GetUnitX(udg_RF_Firebolt[udg_RF_Index])+udg_RF_HSpeed[udg_RF_Index]*Cos(udg_RF_Angle[udg_RF_Index])
                    • Custom script: set udg_RF_Y=GetUnitY(udg_RF_Firebolt[udg_RF_Index])+udg_RF_HSpeed[udg_RF_Index]*Sin(udg_RF_Angle[udg_RF_Index])
                    • Custom script: call SetUnitX(udg_RF_Firebolt[udg_RF_Index],udg_RF_X)
                    • Custom script: call SetUnitY(udg_RF_Firebolt[udg_RF_Index],udg_RF_Y)
                    • Animation - Change RF_Firebolt[RF_Index] flying height to ((Current flying height of RF_Firebolt[RF_Index]) - RF_VSpeed[RF_Index]) at 0.00
                    • Set RF_Distance[RF_Index] = (RF_Distance[RF_Index] - RF_HSpeed[RF_Index])
                  • Else - Actions
                    • Set RF_TempLoc = (Position of RF_Firebolt[RF_Index])
                    • For each (Integer RF_Loop) from 1 to RF_ExplosionEffectNumber, do (Actions)
                      • Loop - Actions
                        • Special Effect - Create a special effect at RF_TempLoc using RF_ExplosionEffect[RF_Loop]
                        • Special Effect - Destroy (Last created special effect)
                    • Set RF_Owner = (Owner of RF_Caster[RF_Index])
                    • Set RF_TempGroup = (Units within RF_DamageRadius[RF_Level[RF_Index]] of RF_TempLoc)
                    • Unit Group - Pick every unit in RF_TempGroup and do (Actions)
                      • Loop - Actions
                        • Set RF_PickedUnit = (Picked unit)
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • (RF_PickedUnit is A flying unit) Equal to False
                            • (RF_PickedUnit belongs to an ally of RF_Owner) Equal to False
                            • (RF_PickedUnit is dead) Equal to False
                          • Then - Actions
                            • Unit - Cause RF_Caster[RF_Index] to damage RF_PickedUnit, dealing RF_Damage[RF_Level[RF_Index]] damage of attack type RF_AttackType and damage type RF_DamageType
                          • Else - Actions
                    • Custom script: call DestroyGroup(udg_RF_TempGroup)
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • RF_DestroyTrees Equal to True
                      • Then - Actions
                        • Destructible - Pick every destructible within RF_DamageRadius[RF_Level[RF_Index]] of RF_TempLoc and do (Actions)
                          • Loop - Actions
                            • Set RF_PickedDest = (Picked destructible)
                            • Custom script: call IssueTargetOrderById(udg_RF_Harvester,udg_RF_HarvestOrderId,udg_RF_PickedDest)
                            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              • If - Conditions
                                • (Current order of RF_Harvester) Equal to RF_HarvestOrderId
                              • Then - Actions
                                • Destructible - Kill RF_PickedDest
                              • Else - Actions
                        • Unit - Order RF_Harvester to Stop
                      • Else - Actions
                    • Custom script: call RemoveLocation(udg_RF_TempLoc)
                    • Unit - Kill RF_Firebolt[RF_Index]
                    • Set RF_StageId[RF_Index] = 3
              • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • RF_StageId[RF_Index] Equal to 2
                  • Then - Actions
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • (RF_Caster[RF_Index] is dead) Equal to False
                        • (Current order of RF_Caster[RF_Index]) Equal to RF_OrderId
                      • Then - Actions
                        • Set RF_rTimer[RF_Index] = (RF_rTimer[RF_Index] - 0.03)
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • RF_rTimer[RF_Index] Less than or equal to 0.00
                          • Then - Actions
                            • Set RF_rTimer[RF_Index] = RF_FireboltSpawnInterval[RF_Level[RF_Index]]
                            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              • If - Conditions
                                • RF_FireboltCount[RF_Index] Greater than 0
                              • Then - Actions
                                • Set RF_TempLoc = (RF_TargetPoint[RF_Index] offset by (Random real number between 0.00 and RF_AoE[RF_Level[RF_Index]]) towards (Random angle) degrees)
                                • Set RF_MaxIndex = (RF_MaxIndex + 1)
                                • Set RF_Angle[RF_MaxIndex] = (Angle from RF_CasterPosition[RF_Index] to RF_TempLoc)
                                • Set RF_Distance[RF_MaxIndex] = (Distance between RF_CasterPosition[RF_Index] and RF_TempLoc)
                                • Unit - Create 1 RF_FireboltMissile for (Owner of RF_Caster[RF_Index]) at RF_CasterPosition[RF_Index] facing RF_Angle[RF_MaxIndex] degrees
                                • Set RF_Firebolt[RF_MaxIndex] = (Last created unit)
                                • Animation - Change RF_Firebolt[RF_MaxIndex] flying height to RF_FireboltSpawnHeight[RF_Level[RF_Index]] at 0.00
                                • Set RF_Caster[RF_MaxIndex] = RF_Caster[RF_Index]
                                • Set RF_Level[RF_MaxIndex] = RF_Level[RF_Index]
                                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  • If - Conditions
                                    • RF_TravelBySpeed Equal to True
                                  • Then - Actions
                                    • Set RF_HSpeed[RF_MaxIndex] = RF_FireboltTravelSpeed[RF_Level[RF_Index]]
                                    • Set RF_FireboltTravelTime[0] = ((RF_Distance[RF_MaxIndex] x 0.03) / RF_HSpeed[RF_MaxIndex])
                                  • Else - Actions
                                    • Set RF_HSpeed[RF_MaxIndex] = (RF_Distance[RF_MaxIndex] / (RF_FireboltTravelTime[RF_Level[RF_Index]] / 0.03))
                                    • Set RF_FireboltTravelTime[0] = RF_FireboltTravelTime[RF_Level[RF_Index]]
                                • Set RF_VSpeed[RF_MaxIndex] = (RF_FireboltSpawnHeight[RF_Level[RF_Index]] / (RF_FireboltTravelTime[0] / 0.03))
                                • Custom script: set udg_RF_Angle[udg_RF_MaxIndex]=udg_RF_Angle[udg_RF_MaxIndex]*bj_DEGTORAD
                                • Set RF_StageId[RF_MaxIndex] = 1
                                • Set RF_FireboltCount[RF_Index] = (RF_FireboltCount[RF_Index] - 1)
                                • Custom script: call RemoveLocation(udg_RF_TempLoc)
                              • Else - Actions
                                • Unit - Order RF_Caster[RF_Index] to Stop
                          • Else - Actions
                      • Else - Actions
                        • Custom script: call RemoveLocation(udg_RF_CasterPosition[udg_RF_Index])
                        • Custom script: call RemoveLocation(udg_RF_TargetPoint[udg_RF_Index])
                        • Set RF_StageId[RF_Index] = 3
                  • Else - Actions
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • RF_StageId[RF_Index] Equal to 3
                      • Then - Actions
                        • Set RF_Angle[RF_Index] = RF_Angle[RF_MaxIndex]
                        • Set RF_Caster[RF_Index] = RF_Caster[RF_MaxIndex]
                        • Set RF_CasterPosition[RF_Index] = RF_CasterPosition[RF_MaxIndex]
                        • Set RF_Distance[RF_Index] = RF_Distance[RF_MaxIndex]
                        • Set RF_Firebolt[RF_Index] = RF_Firebolt[RF_MaxIndex]
                        • Set RF_FireboltCount[RF_Index] = RF_FireboltCount[RF_MaxIndex]
                        • Set RF_HSpeed[RF_Index] = RF_HSpeed[RF_MaxIndex]
                        • Set RF_Level[RF_Index] = RF_Level[RF_MaxIndex]
                        • Set RF_StageId[RF_Index] = RF_StageId[RF_MaxIndex]
                        • Set RF_TargetPoint[RF_Index] = RF_TargetPoint[RF_MaxIndex]
                        • Set RF_VSpeed[RF_Index] = RF_VSpeed[RF_MaxIndex]
                        • Set RF_rTimer[RF_Index] = RF_rTimer[RF_MaxIndex]
                        • Set RF_Index = (RF_Index - 1)
                        • Set RF_MaxIndex = (RF_MaxIndex - 1)
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • RF_MaxIndex Equal to 0
                          • Then - Actions
                            • Trigger - Turn off (This trigger)
                          • Else - Actions
                      • Else - Actions
  • Last Message

    Hope you like this! :D
Go to the top

Changelog


v7.0
- Initial version

Keywords:
Rapid, Firebolt, Missile, AoE, MUI, GUI.
Contents

testmap (Map)

Reviews
12:42, 18th Jan 2014 BPower: The spell is leakless, MUI and performs well. The chosen effects fit to the content of the spell. Tooltips are fine. Use "spell" as Art - Animation Names instead of "stand". DamageType fire, cold, poison, etc...

Moderator

M

Moderator

12:42, 18th Jan 2014
BPower:
  • The spell is leakless, MUI and performs well.
  • The chosen effects fit to the content of the spell.
  • Tooltips are fine.
  • Use "spell" as Art - Animation Names instead of "stand".
  • DamageType fire, cold, poison, etc equal DamageType magic the wc3 engine doesn't make a difference here.
The triggering looks good, I've added a few suggestions to optimize the code here
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
Some suggestions:

- Use "spell" as Art - Animation Names instead of "stand".
- udg_RF_HSpeed[udg_RF_Index]*Cos(udg_RF_Angle[udg_RF_Index]
This is actually constant per missle. You could set udg_RF_HSCos to the whole term at the end of stage 2. Ofc you now need another variable for Sin calculation aswell.
- DamageType fire, cold, poison, etc equal DamageType magic the wc3 engine doesn't make a difference here.

- You filter out flying units :thumbs_up:
- tooltip and objects are fine, the effects really fit to the concept.

Nice spell overall :)
 
Last edited:
Level 10
Joined
Aug 21, 2010
Messages
316
BPover is right.There is no difference between fire damage and magical. Fire = Magic etc.The only way to manipulate the magical damage is to make your own system, but believe me it is a very difficult job.
Btw. cool spell
 
  • Like
Reactions: ILH
Level 5
Joined
Feb 1, 2009
Messages
111
Your spell has been chosen to be added in my upcoming Hero RPG of epic proportions. This spell serves for my Fire Mage's 3rd ability and you have been credited. Thank you and if you want to come test my map and see your spell in action (with some modifications ) do PM me on these boards.
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
You could use a player variable instead of detecting the owner in each loop.

IssueTargetOrderById returns a boolean which is only true if the order is executed properly. In other words if it is not a tree the condition will be false.
Instead of:
  • Custom script: call IssueTargetOrderById(udg_RF_Harvester,udg_RF_HarvestOrderId,udg_RF_PickedDest)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Current order of RF_Harvester) Equal to RF_HarvestOrderId
    • Then - Actions
      • Destructible - Kill RF_PickedDest
    • Else - Actions
You can shorten it to:
  • Custom script: if IssueTargetOrderById(udg_RF_Harvester,udg_RF_HarvestOrderId,udg_RF_PickedDest) then
  • Destructible - Kill RF_PickedDest
  • Custom script: endif
The following is very optional, it's just a small boost of the spell performance.

For udg_RF_HSpeed[udg_RF_Index]*Cos(udg_RF_Angle[udg_RF_Index]
--> RF_Speed is determined in stage 2 and will be constant for stage 1.
--> RF_Angle is determined in stage 2 and will be constant for stage 1.
--> Conclusion: The whole term will always have the same value each loop.
--> Solution: Calculate it in stage 2: udg_RF_Cos[udg_RF_Index] = udg_RF_HSpeed[udg_RF_Index]*Cos(udg_RF_Angle[udg_RF_Index]
  • set udg_RF_X=GetUnitX(udg_RF_Firebolt[udg_RF_Index])+udg_RF_Cos[udg_RF_Index])
 
Last edited:
Top