• 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] Help with Spell

Status
Not open for further replies.
Level 1
Joined
Jan 1, 2011
Messages
5
I'm not sure if here is the right local to this topic, sorry if I'm wrong.

I'm trying to make a spell that is basically the Warcraft 3 default spell "Flame Strike", but the damage is 20x(Level of Spell). For that, I will need to use triggers.

I tried a bunch of times, but I can't get it working without keep damaging the units that already moved away from the burning area.

Could someone help me with this? Trying to explain to me using GUI?

Thanks for any answer.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
You must trigger from the start of the flame (channeling) until the end of it, all of it trigger-wise.
Therefore you must trigger the creation of Flame Strike model (dummy), and would remove the dummy if the channeling is cancelled, etc etc.

Yeah, it's a hardwork, not just damage x 20 trigger.
 
I'm not sure if here is the right local to this topic, sorry if I'm wrong.

I'm trying to make a spell that is basically the Warcraft 3 default spell "Flame Strike", but the damage is 20x(Level of Spell). For that, I will need to use triggers.

I tried a bunch of times, but I can't get it working without keep damaging the units that already moved away from the burning area.

Could someone help me with this? Trying to explain to me using GUI?

Thanks for any answer.
*** Attached: the requested ability
Tell me if you need any further help.
 

Attachments

  • testttt.w3x
    13 KB · Views: 76
Level 1
Joined
Jan 1, 2011
Messages
5
Thanks everyone for the help, I already discovered by myself how to do it, but I'll try the other one you suggest me.

Code:

  • Caster Trigger
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability bein cast) Equal to [D]Pulverização [Doomage]
      • Actions
        • Set Points[1] = (Target point of ability being cast)
        • Special Effect - Create a special effect at Points[1] using Abilities\Spells\Human\FlameStrike\FlameStrikeTarget.mdl
        • Wait 0.50 seconds
        • Special Effect - Destroy (Last created special effect)
        • Unit - Move Dummy 0037 <gen> instantly to Points[1]
        • Special Effect - Create a special effect at Points[1] using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
        • Wait 5.00 seconds
        • Unit - Move Dummy 0037 <gen> instantly to (Center of Dummy Region <gen>)
        • Special Effect - Destroy (Last created special effect)

  • Damage Trigger
    • Unit - A unit comes within 200.00 of Dummy 0037 <gen>
  • Conditions
    • ((Triggering unit) belong to an enemy of Player 1 (Red)) Equal to True
  • Actions
    • Unit - Cause Heroi[6] to damage (Triggering unit), dealing (20.00 x (Real((Level of [d]Pulverização [Doomage] for Heroi[6])))) damage of attack type Spells and damage type Normal
    • Wait 1.00 seconds
    • Unit - Cause Heroi[6] to damage (Triggering unit), dealing (20.00 x (Real((Level of [d]Pulverização [Doomage] for Heroi[6])))) damage of attack type Spells and damage type Normal
    • Wait 1.00 seconds
    • Unit - Cause Heroi[6] to damage (Triggering unit), dealing (20.00 x (Real((Level of [d]Pulverização [Doomage] for Heroi[6])))) damage of attack type Spells and damage type Normal
    • Wait 1.00 seconds
    • Unit - Cause Heroi[6] to damage (Triggering unit), dealing (20.00 x (Real((Level of [d]Pulverização [Doomage] for Heroi[6])))) damage of attack type Spells and damage type Normal
    • Wait 1.00 seconds
    • Unit - Cause Heroi[6] to damage (Triggering unit), dealing (20.00 x (Real((Level of [d]Pulverização [Doomage] for Heroi[6])))) damage of attack type Spells and damage type Normal
    • Wait 1.00 seconds
Edit:

Ok, I just realized that the problem is still happening, I'll fix it later.

Maybe some Trigger and Variables for run the trigger 5 times, so it can check if the unit is still in the burning area or not.
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
mine looks like this :

  • Flame Strike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Flame Strike
    • Actions
      • Set FS_Damage = (20.00 x (Real((Level of Flame Strike for (Triggering unit)))))
      • Set FS_AOE = 200.00
      • Set FS_Duration = 6.00
      • Set tempPoint = (Target point of ability being cast)
      • Unit - Create 1 Dummy (1) for (Owner of (Triggering unit)) at tempPoint facing Default building facing degrees
      • Unit Group - Add (Last created unit) to tempGroup
      • Set HandleId = (Key (Last created unit))
      • Hashtable - Save FS_Damage as 0 of HandleId in hash
      • Hashtable - Save FS_AOE as 1 of HandleId in hash
      • Hashtable - Save FS_Duration as 2 of HandleId in hash
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (FS Loop <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on FS Loop <gen>
        • Else - Actions
      • Set FS_Count = (FS_Count + 1)
      • Custom script: call RemoveLocation (udg_tempPoint)
  • FS Loop [Initially On]
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in tempGroup and do (Actions)
        • Loop - Actions
          • Set tempPoint = (Position of (Picked unit))
          • Set HandleId = (Key (Picked unit))
          • Set FS_Damage = (Load 0 of HandleId from hash)
          • Set FS_AOE = (Load 1 of HandleId from hash)
          • Set FS_Duration = ((Load 2 of HandleId from hash) - 1.00)
          • Game - Display to (All players) the text: (String(FS_Duration))
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units within FS_AOE of tempPoint 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 FS_Damage damage of attack type Spells and damage type Normal
          • Custom script: call RemoveLocation (udg_tempPoint)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FS_Duration Less than or equal to 0.00
            • Then - Actions
              • Game - Display to (All players) the text: Stop
              • Set FS_Count = (FS_Count - 1)
              • Unit Group - Remove (Picked unit) from tempGroup
              • Unit - Add a 0.10 second Generic expiration timer to (Picked unit)
              • Hashtable - Clear all child hashtables of child HandleId in hash
            • Else - Actions
              • Hashtable - Save FS_Duration as 2 of HandleId in hash
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FS_Count Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
you should really read up tutorials about MUI and Leaks cleaning before making any complicated spell with triggers, your spell is not MUI and leaking, not even close to MPI. and also using wait is really bad for spells and systems, it's recommended for triggering though but you need to read MUI Triggers with Waits first. Trust me! it works.
 
Level 1
Joined
Jan 1, 2011
Messages
5
I'll read some tutorials in this forum.
I'm not fixing any leaks from the code and everything else, because the map is in the first version of alpha, and I'm making this way for the team could take a look at it and help me better.

I'm planning to learn how to use Hashtables (because I have no idea of what is it, but I'm searching tutorials here) and Jass.

Thanks for the help, anyway. I'll try the codes you suggest me. ^^
 
Status
Not open for further replies.
Top