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

[Spell] fireball spell

Status
Not open for further replies.
Level 4
Joined
Jan 13, 2013
Messages
92
how do i make a fireball spell that explode on enemy contact? something like fireball in the map 'warlock'
 

Rheiko

Spell Reviewer
Level 25
Joined
Aug 27, 2013
Messages
4,121
firstly, is this an AoE or single target spell?
if single, make a Fire Ball ability based on Fire Bolt, change the missile to fireball then use DDS, create an explosion special effect at that unit
if AoE, do as Golden-Drake said

@Malhorne
you can just use DDS and based the ability on firebolt with missile changed if it is Single Target
but if it is an AoE spell, yes. the fireball's movement must be triggered
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
Make a missile to the position of caster, add the missile to the group and loop it to the group which is moving, save the important datas in the hashtable, make spell stage 2, Pick every units in the missile ( random unit in the group ), If it is true then kill the missile or remove, add the picked units in the group and save again the important datas about knockback, make the spell stage to 2, after that check if the spell stage is 1, knockback the unit to the angle of their position, Duration or Distance must be reached before removing the knockbacked unit and Flushing child the ID or Keys to the hashtable, Decrease the spell instances, Check ITE if instances == 0 then turn off. Well Done!
 

Rheiko

Spell Reviewer
Level 25
Joined
Aug 27, 2013
Messages
4,121
i hope this is what you want

@jakeZinc
If my guess was right, what does he mean is already inside the test map (the single target)

Edit: Added the Triggers

  • Fireball
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fireball [Multi]
    • Actions
      • Set Max_Index = (Max_Index + 1)
      • Set Caster[Max_Index] = (Triggering unit)
      • Set TempPoint = (Position of Caster[Max_Index])
      • Set TempPoint2 = (Target point of ability being cast)
      • Set Angle[Max_Index] = (Angle from TempPoint to TempPoint2)
      • Set TempPoint3 = (TempPoint offset by 100.00 towards Angle[Max_Index] degrees)
      • Unit - Create 1 Fireball for (Owner of Caster[Max_Index]) at TempPoint3 facing Angle[Max_Index] degrees
      • Set Dummy[Max_Index] = (Last created unit)
      • Unit - Add a ((1000.00 x 0.03) x 0.03) second Generic expiration timer to Dummy[Max_Index]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Max_Index Equal to 1
        • Then - Actions
          • Trigger - Turn on Loop <gen>
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: call RemoveLocation(udg_TempPoint3)
  • Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Current_Index) from 1 to Max_Index, do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of Dummy[Current_Index])
          • Set TempPoint2 = (TempPoint offset by (1000.00 x 0.03) towards Angle[Current_Index] degrees)
          • Unit - Move Dummy[Current_Index] instantly to TempPoint2
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units within 50.00 of TempPoint matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of Caster[Current_Index])) Equal to True) and (((Matching unit) is A structure) Equal to False)))) and do (Actions)
            • Loop - Actions
              • Unit - Kill Dummy[Current_Index]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Dummy[Current_Index] is dead) Equal to True
            • Then - Actions
              • Special Effect - Create a special effect at TempPoint using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
              • Special Effect - Destroy (Last created special effect)
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within 300.00 of TempPoint matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of Caster[Current_Index])) Equal to True) and (((Matching unit) is A structure) Equal to False)))) and do (Actions)
                • Loop - Actions
                  • Set TempUnit = (Picked unit)
                  • Unit - Cause Caster[Current_Index] to damage TempUnit, dealing (100.00 x (Real((Level of Fireball [Multi] for Caster[Current_Index])))) damage of attack type Spells and damage type Normal
              • Set Caster[Current_Index] = Caster[Max_Index]
              • Set Caster[Max_Index] = No unit
              • Set Dummy[Current_Index] = Dummy[Max_Index]
              • Set Dummy[Max_Index] = No unit
              • Set Angle[Current_Index] = Angle[Max_Index]
              • Set Angle[Max_Index] = 0.00
              • Set Current_Index = (Current_Index - 1)
              • Set Max_Index = (Max_Index - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Max_Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Custom script: call RemoveLocation(udg_TempPoint2)
  • Fireball ST
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fireball [Single]
    • Actions
      • Set Max_Index = (Max_Index + 1)
      • Set Caster[Max_Index] = (Triggering unit)
      • Set Target[Max_Index] = (Target unit of ability being cast)
      • Set TempPoint = (Position of Caster[Max_Index])
      • Set TempPoint2 = (Position of Target[Max_Index])
      • Set Angle[Max_Index] = (Angle from TempPoint to TempPoint2)
      • Set TempPoint3 = (TempPoint offset by 100.00 towards Angle[Max_Index] degrees)
      • Unit - Create 1 Fireball for (Owner of Caster[Max_Index]) at TempPoint3 facing Angle[Max_Index] degrees
      • Set Dummy[Max_Index] = (Last created unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Max_Index Equal to 1
        • Then - Actions
          • Trigger - Turn on Loop 2 <gen>
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: call RemoveLocation(udg_TempPoint3)
  • Loop 2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Current_Index) from 1 to Max_Index, do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of Dummy[Current_Index])
          • Set TempPoint2 = (Position of Target[Current_Index])
          • Set Angle[Current_Index] = (Angle from TempPoint to TempPoint2)
          • Set TempPoint3 = (TempPoint offset by (1000.00 x 0.03) towards Angle[Current_Index] degrees)
          • Unit - Move Dummy[Current_Index] instantly to TempPoint3
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between TempPoint and TempPoint2) Less than or equal to 100.00
            • Then - Actions
              • Special Effect - Create a special effect at TempPoint using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Kill Dummy[Current_Index]
              • Unit - Cause Caster[Current_Index] to damage Target[Current_Index], dealing (100.00 x (Real((Level of Fireball [Single] for Caster[Current_Index])))) damage of attack type Spells and damage type Normal
              • Set Caster[Current_Index] = Caster[Max_Index]
              • Set Caster[Max_Index] = No unit
              • Set Target[Current_Index] = Target[Max_Index]
              • Set Target[Max_Index] = No unit
              • Set Dummy[Current_Index] = Dummy[Max_Index]
              • Set Dummy[Max_Index] = No unit
              • Set Angle[Current_Index] = Angle[Max_Index]
              • Set Angle[Max_Index] = 0.00
              • Set Current_Index = (Current_Index - 1)
              • Set Max_Index = (Max_Index - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Max_Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Custom script: call RemoveLocation(udg_TempPoint2)
          • Custom script: call RemoveLocation(udg_TempPoint3)
 

Attachments

  • -Test Map-.w3x
    22.6 KB · Views: 104

Rheiko

Spell Reviewer
Level 25
Joined
Aug 27, 2013
Messages
4,121
not this?
  • Fireball ST
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fireball [Single]
    • Actions
      • Set Max_Index = (Max_Index + 1)
      • Set Caster[Max_Index] = (Triggering unit)
      • Set Target[Max_Index] = (Target unit of ability being cast)
      • Set TempPoint = (Position of Caster[Max_Index])
      • Set TempPoint2 = (Position of Target[Max_Index])
      • Set Angle[Max_Index] = (Angle from TempPoint to TempPoint2)
      • Set TempPoint3 = (TempPoint offset by 100.00 towards Angle[Max_Index] degrees)
      • Unit - Create 1 Fireball for (Owner of Caster[Max_Index]) at TempPoint3 facing Angle[Max_Index] degrees
      • Set Dummy[Max_Index] = (Last created unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Max_Index Equal to 1
        • Then - Actions
          • Trigger - Turn on Loop 2 <gen>
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: call RemoveLocation(udg_TempPoint3)
  • Loop 2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Current_Index) from 1 to Max_Index, do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of Dummy[Current_Index])
          • Set TempPoint2 = (Position of Target[Current_Index])
          • Set Angle[Current_Index] = (Angle from TempPoint to TempPoint2)
          • Set TempPoint3 = (TempPoint offset by (1000.00 x 0.03) towards Angle[Current_Index] degrees)
          • Unit - Move Dummy[Current_Index] instantly to TempPoint3
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between TempPoint and TempPoint2) Less than or equal to 100.00
            • Then - Actions
              • Special Effect - Create a special effect at TempPoint using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Kill Dummy[Current_Index]
              • Unit - Cause Caster[Current_Index] to damage Target[Current_Index], dealing (100.00 x (Real((Level of Fireball [Single] for Caster[Current_Index])))) damage of attack type Spells and damage type Normal
              • Set Caster[Current_Index] = Caster[Max_Index]
              • Set Caster[Max_Index] = No unit
              • Set Target[Current_Index] = Target[Max_Index]
              • Set Target[Max_Index] = No unit
              • Set Dummy[Current_Index] = Dummy[Max_Index]
              • Set Dummy[Max_Index] = No unit
              • Set Angle[Current_Index] = Angle[Max_Index]
              • Set Angle[Max_Index] = 0.00
              • Set Current_Index = (Current_Index - 1)
              • Set Max_Index = (Max_Index - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Max_Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Custom script: call RemoveLocation(udg_TempPoint2)
          • Custom script: call RemoveLocation(udg_TempPoint3)
 
Level 11
Joined
Mar 27, 2011
Messages
293
not this?
  • Fireball ST
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fireball [Single]
    • Actions
      • Set Max_Index = (Max_Index + 1)
      • Set Caster[Max_Index] = (Triggering unit)
      • Set Target[Max_Index] = (Target unit of ability being cast)
      • Set TempPoint = (Position of Caster[Max_Index])
      • Set TempPoint2 = (Position of Target[Max_Index])
      • Set Angle[Max_Index] = (Angle from TempPoint to TempPoint2)
      • Set TempPoint3 = (TempPoint offset by 100.00 towards Angle[Max_Index] degrees)
      • Unit - Create 1 Fireball for (Owner of Caster[Max_Index]) at TempPoint3 facing Angle[Max_Index] degrees
      • Set Dummy[Max_Index] = (Last created unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Max_Index Equal to 1
        • Then - Actions
          • Trigger - Turn on Loop 2 <gen>
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: call RemoveLocation(udg_TempPoint3)
  • Loop 2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Current_Index) from 1 to Max_Index, do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of Dummy[Current_Index])
          • Set TempPoint2 = (Position of Target[Current_Index])
          • Set Angle[Current_Index] = (Angle from TempPoint to TempPoint2)
          • Set TempPoint3 = (TempPoint offset by (1000.00 x 0.03) towards Angle[Current_Index] degrees)
          • Unit - Move Dummy[Current_Index] instantly to TempPoint3
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between TempPoint and TempPoint2) Less than or equal to 100.00
            • Then - Actions
              • Special Effect - Create a special effect at TempPoint using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Kill Dummy[Current_Index]
              • Unit - Cause Caster[Current_Index] to damage Target[Current_Index], dealing (100.00 x (Real((Level of Fireball [Single] for Caster[Current_Index])))) damage of attack type Spells and damage type Normal
              • Set Caster[Current_Index] = Caster[Max_Index]
              • Set Caster[Max_Index] = No unit
              • Set Target[Current_Index] = Target[Max_Index]
              • Set Target[Max_Index] = No unit
              • Set Dummy[Current_Index] = Dummy[Max_Index]
              • Set Dummy[Max_Index] = No unit
              • Set Angle[Current_Index] = Angle[Max_Index]
              • Set Angle[Max_Index] = 0.00
              • Set Current_Index = (Current_Index - 1)
              • Set Max_Index = (Max_Index - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Max_Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Custom script: call RemoveLocation(udg_TempPoint2)
          • Custom script: call RemoveLocation(udg_TempPoint3)

Yeah, but I should them an example.
+ D
 
Status
Not open for further replies.
Top