• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

requesting a simple spell

Status
Not open for further replies.
Level 6
Joined
Jul 21, 2011
Messages
139
a dummy goes from the position of the casting unit to the target ground point (no further) and explodes
 
a dummy goes from the position of the casting unit to the target ground point (no further) and explodes

done. i used UnitIndexer

you can configure :
Damages = simplespellExplodeDamages[cv]
Radius = simplespellRadius[cv]

just change the dummy model to change the missile.

triggers

  • Simple Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Simple Spell
    • Actions
      • Set tempPoint = (Position of (Triggering unit))
      • Unit - Create 1 Dummy (1) for (Owner of (Triggering unit)) at tempPoint facing Default building facing degrees
      • Set cv = (Custom value of (Last created unit))
      • Set dummyPoint[cv] = (Position of (Last created unit))
      • Set targetPoint[cv] = (Target point of ability being cast)
      • Set simplespellAngle[cv] = (Angle from dummyPoint[cv] to targetPoint[cv])
      • Set simplespellDistances[cv] = (Distance between dummyPoint[cv] and targetPoint[cv])
      • Set simplespellExplodeDamages[cv] = ((Real((Level of Simple Spell for (Triggering unit)))) x 150.00)
      • Set simplespellRadius[cv] = ((Real((Level of Simple Spell for (Triggering unit)))) x 150.00)
      • Unit Group - Add (Last created unit) to simplespellGroup
      • Set simplespellCount = (simplespellCount + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Movement <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Movement <gen>
        • Else - Actions
      • Custom script: call RemoveLocation (udg_dummyPoint[udg_cv])
      • Custom script: call RemoveLocation (udg_tempPoint)
  • Movement
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in simplespellGroup and do (Actions)
        • Loop - Actions
          • Set cv = (Custom value of (Picked unit))
          • Set dummyPoint[cv] = (Position of (Picked unit))
          • Set simplespellCurrentDistances[cv] = (simplespellCurrentDistances[cv] + 30.00)
          • Set tempPoint2 = (dummyPoint[cv] offset by 30.00 towards simplespellAngle[cv] degrees)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • simplespellCurrentDistances[cv] Greater than or equal to simplespellDistances[cv]
            • Then - Actions
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within simplespellRadius[cv] of dummyPoint[cv] matching (((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True)) and do (Actions)
                • Loop - Actions
                  • Unit - Cause (Picked unit) to damage (Picked unit), dealing simplespellExplodeDamages[cv] damage of attack type Spells and damage type Normal
              • Unit - Explode (Picked unit)
              • Unit Group - Remove (Picked unit) from simplespellGroup
              • Custom script: call RemoveLocation (udg_targetPoint[udg_cv])
              • Custom script: call RemoveLocation (udg_dummyPoint[udg_cv])
              • Set simplespellCurrentDistances[cv] = 0.00
              • Set simplespellCount = (simplespellCount - 1)
            • Else - Actions
              • Unit - Move (Picked unit) instantly to tempPoint2
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • simplespellCount Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
here is a test map. please give me feedback about this spell, don't let my time go in waste.
 

Attachments

Last edited:
sorry i didnt see this before, after a lot of searching i finnaly found a spell that had what i wanted, i wasnt able to figure out how to stop the dummy at the location where you click

( simplespellCurrentDistances[cv] Greater than or equal to simplespellDistances[cv])

^ thats what i was missing

and your spell seems to be perfect, it also works when many units are casting it at the same time, thanks!
 
Status
Not open for further replies.
Back
Top