• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Help please

Status
Not open for further replies.
Level 5
Joined
Oct 20, 2019
Messages
60
Hello, i have two spells that im currently working on, but im stuck.
I would really appreciate the help =) ty


The first one is a blizzard ability that slows units within the aoe, however the units are slowed only upon the first wave (theres a total of 5 Waves), i would like all of the 5 Waves to be able to slow units.
How do i add that to the trigger?
Theres a 1 second time between each wave

  • Freezing Blizzard
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Freezing Blizzard (Hero)
    • Actions
      • Set FreezingBlizzardDummyPoint = (Position of (Triggering unit))
      • Set FreezingBlizzardPoint = (Target point of ability being cast)
      • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at FreezingBlizzardDummyPoint facing Default building facing degrees
      • Unit - Add a 6.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Freezing Blizzard (Dummy) to (Last created unit)
      • Unit - Set level of Freezing Blizzard (Dummy) for (Last created unit) to (Level of Freezing Blizzard (Hero) for (Triggering unit))
      • Unit - Order (Last created unit) to Human Archmage - Blizzard FreezingBlizzardPoint
      • Custom script: call RemoveLocation(udg_FreezingBlizzardDummyPoint)
      • Custom script: call RemoveLocation(udg_FreezingBlizzardPoint)


  • Freezing Blizzard Slow
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Freezing Blizzard (Hero)
    • Actions
      • Set FreezingBlizzardDummyPoint = (Position of (Triggering unit))
      • Set FreezingBlizzardPoint = (Target point of ability being cast)
      • Set FreezingBlizzardGroup = (Units within 250.00 of FreezingBlizzardPoint)
      • Unit Group - Pick every unit in FreezingBlizzardGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Triggering player)) Equal to True
              • ((Picked unit) is A structure) Equal to False
              • ((Picked unit) is Mechanical) Equal to False
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at FreezingBlizzardDummyPoint facing Default building facing degrees
              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
              • Unit - Add FreezingBlizzard (Slow) to (Last created unit)
              • Unit - Set level of FreezingBlizzard (Slow) for (Last created unit) to (Level of Freezing Blizzard (Hero) for (Triggering unit))
              • Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_FreezingBlizzardDummyPoint)
      • Custom script: call RemoveLocation(udg_FreezingBlizzardPoint)
      • Custom script: call DestroyGroup(udg_FreezingBlizzardGroup)


The second spell is a simple blink ability but i would like the hero to recieve a temporarily intelligence bonus after the blink ability is used that lasts for 6 seconds.
I am aware why this trigger dosent give me what i want but i dont know how to fix it to last for 6 seconds

  • Blink Intelligence
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blink (Hero)
    • Actions
      • Unit - Add Blink (Intelligence) to (Triggering unit)
      • Unit - Set level of Blink (Intelligence) for (Triggering unit) to (Level of Blink (Hero) for (Triggering unit))
      • Unit Group - Add (Triggering unit) to Blink_CheckGroup


  • Blink Remove
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Blink_CheckGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Ascendancy (Blink) ) Equal to False
            • Then - Actions
              • Unit Group - Remove (Picked unit) from Blink_CheckGroup
              • Unit - Remove Blink (Intelligence) from (Picked unit)
            • Else - Actions
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,579
Blink: You don't need the Blink Remove trigger. Instead, remove the Blink Unit Group and add this to the Blink Intelligence trigger: "Wait 6.00 seconds -> Remove Blink (Intelligence) from triggering unit".

Blizzard: This is when you want to use a periodic timer like you did with Blink Remove. Also, you will want to use a Unit Indexer or some kind of Dynamic Indexing. I have links to these in my signature.

The trigger will look something like this:
"Every 0.10 seconds -> For each Integer from 1 to BlizzardCount -> Increase BlizzardDuration[index] by 1 -> If BlizzardDuration[index] equal to 10, 20, 30, 40, or 50 -> Create the dummy for BlizzardCaster[index], set the unit group, and apply the slow to units in that group."

That would make the spells completely MUI. If only 1 Hero will ever use these abilities and their cooldowns will be long enough that you can't "stack" casts (like casting Blizzard before the last Blizzard finishes) then you can very easily do all of this with non-Array variables and Waits.
 
Last edited:
Level 5
Joined
Oct 20, 2019
Messages
60
ty for helping me =)

Blink works nicely, that was quite a simple solution :p

However, This is what i've got so far on the blizzard trigger but it's not correctly done because it dosent work, maybe you can Point out whats wrong with it, hopefully it isn't total garbage xD


  • Freezing Blizzard Repeat
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to Blizzard_Index, do (Actions)
        • Loop - Actions
          • Set Blizzard_Duration[Blizzard_Index] = (Blizzard_Duration[Blizzard_Index] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Blizzard_Duration[Blizzard_Index] Equal to 10
              • Blizzard_Duration[Blizzard_Index] Equal to 20
              • Blizzard_Duration[Blizzard_Index] Equal to 30
              • Blizzard_Duration[Blizzard_Index] Equal to 40
              • Blizzard_Duration[Blizzard_Index] Equal to 50
            • Then - Actions
              • Unit Group - Pick every unit in (Units within 250.00 of FreezingBlizzardPoint) and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) belongs to an enemy of (Triggering player)) Equal to True
                      • ((Picked unit) is A structure) Equal to False
                      • ((Picked unit) is Mechanical) Equal to False
                      • ((Picked unit) is alive) Equal to True
                    • Then - Actions
                      • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at FreezingBlizzardDummyPoint facing Default building facing degrees
                      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                      • Unit - Add FreezingBlizzard (Slow) to (Last created unit)
                      • Unit - Set level of FreezingBlizzard (Slow) for (Last created unit) to (Level of Freezing Blizzard (Hero) for (Triggering unit))
                      • Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
                    • Else - Actions
            • Else - Actions
 
Level 14
Joined
Oct 19, 2014
Messages
187
ty for helping me =)

Blink works nicely, that was quite a simple solution :p

However, This is what i've got so far on the blizzard trigger but it's not correctly done because it dosent work, maybe you can Point out whats wrong with it, hopefully it isn't total garbage xD


  • Freezing Blizzard Repeat
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to Blizzard_Index, do (Actions)
        • Loop - Actions
          • Set Blizzard_Duration[Blizzard_Index] = (Blizzard_Duration[Blizzard_Index] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Blizzard_Duration[Blizzard_Index] Equal to 10
              • Blizzard_Duration[Blizzard_Index] Equal to 20
              • Blizzard_Duration[Blizzard_Index] Equal to 30
              • Blizzard_Duration[Blizzard_Index] Equal to 40
              • Blizzard_Duration[Blizzard_Index] Equal to 50
            • Then - Actions
              • Unit Group - Pick every unit in (Units within 250.00 of FreezingBlizzardPoint) and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) belongs to an enemy of (Triggering player)) Equal to True
                      • ((Picked unit) is A structure) Equal to False
                      • ((Picked unit) is Mechanical) Equal to False
                      • ((Picked unit) is alive) Equal to True
                    • Then - Actions
                      • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at FreezingBlizzardDummyPoint facing Default building facing degrees
                      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                      • Unit - Add FreezingBlizzard (Slow) to (Last created unit)
                      • Unit - Set level of FreezingBlizzard (Slow) for (Last created unit) to (Level of Freezing Blizzard (Hero) for (Triggering unit))
                      • Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
                    • Else - Actions
            • Else - Actions
First thing first is that the caster of Freezing Blizzard is not recognized,
You created dummy that owns by whom?
  • Owner of (Triggering unit)
Or simply create them that owned of Player Neutral Passive
Optionally get the caster in case if you damage them..

Make sure to catch the caster at trigger cast like this

Trigger Cast:
Set Blizzard_Index=Blizzard_Index+1
Set Blizzard_Caster[Blizzard_Index]=Get the caster

at trigger loop
Freezing Blizzard Repeat:
There is no any deindex
aslo be aware that you used the Blizzard_Index Instead of Integer A

When wave will end
Put at else
Set Blizzard_Caster[Integer A]=no unit
Set Blizzard_Caster[integer A]=Blizzard_Caster[Blizzard_Index]
Set Blizzard_Duration[Integer A]=Blizzard_Duration[Blizzard_Index]
Set Blizzard_Index=Blizzard_Index-1
Set Integer A=Integer A-1
If Blizzard_Index equal to 0 then
call DisableTrigger(This Trigger)
endif
 
Last edited:
Level 5
Joined
Oct 20, 2019
Messages
60
ty for the help =) +rep

i got some help from a friend since i didn't quite fully understand your way of doing this, i still have alot to learn =)

However, this is how we did it

  • Freezing Blizzard
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Freezing Blizzard (Hero)
    • Actions
      • Set BlizzardV2_Caster = (Triggering unit)
      • Set BlizzardV2_Duration = 0.00
      • Set FreezingBlizzardDummyPoint = (Position of (Triggering unit))
      • Set FreezingBlizzardPoint = (Target point of ability being cast)
      • Set FreezingBlizzardGroup = (Units within 250.00 of FreezingBlizzardPoint)
      • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at FreezingBlizzardDummyPoint facing Default building facing degrees
      • Unit - Add a 6.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Freezing Blizzard (Dummy) to (Last created unit)
      • Unit - Set level of Freezing Blizzard (Dummy) for (Last created unit) to (Level of Freezing Blizzard (Hero) for (Triggering unit))
      • Unit - Order (Last created unit) to Human Archmage - Blizzard FreezingBlizzardPoint
      • Unit Group - Pick every unit in FreezingBlizzardGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
              • ((Picked unit) is A structure) Equal to False
              • ((Picked unit) is Mechanical) Equal to False
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at FreezingBlizzardDummyPoint facing Default building facing degrees
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Unit - Add FreezingBlizzard (Slow) to (Last created unit)
              • Unit - Set level of FreezingBlizzard (Slow) for (Last created unit) to (Level of Freezing Blizzard (Hero) for (Triggering unit))
              • Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_FreezingBlizzardDummyPoint)
      • Custom script: call DestroyGroup(udg_FreezingBlizzardGroup)
      • Trigger - Turn on Freezing Blizzard Loop <gen>

  • Freezing Blizzard Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set BlizzardV2_Duration = (BlizzardV2_Duration + 1.00)
      • Set FreezingBlizzardGroup = (Units within 250.00 of FreezingBlizzardPoint)
      • Unit Group - Pick every unit in FreezingBlizzardGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of BlizzardV2_Caster)) Equal to True
              • ((Picked unit) is A structure) Equal to False
              • ((Picked unit) is Mechanical) Equal to False
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • Unit - Create 1 Dummy Unit for (Owner of BlizzardV2_Caster) at FreezingBlizzardPoint facing Default building facing degrees
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Unit - Add FreezingBlizzard (Slow) to (Last created unit)
              • Unit - Set level of FreezingBlizzard (Slow) for (Last created unit) to (Level of Freezing Blizzard (Hero) for BlizzardV2_Caster)
              • Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
            • Else - Actions
      • Custom script: call DestroyGroup(udg_FreezingBlizzardGroup)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BlizzardV2_Duration Greater than or equal to 5.00
        • Then - Actions
          • Custom script: call RemoveLocation(udg_FreezingBlizzardPoint)
          • Trigger - Turn off (This trigger)
        • Else - Actions
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,579
Sorry, I had left some important details out. I was planning on uploading a test map but I never got around to it.

Anyway, your new version is perfectly fine under the right circumstances. 1) Only 1 unit will use this ability. 2) The abilities cooldown is longer than the duration (so longer than 5 seconds).

And for future help, it's helpful to let us know if you want the spell to be MUI or not. Here's some terminology:
OSI = One Single Instance
MPI = Multi Player Instanceable
MUI = Multi Unit Instanceable
SUMI = Same Unit Multi Instanceable

In this case it appears that your goal was to have 1 Unit that will have this ability and only 1 instance of the ability occurring at any given time. That's very important information to clarify for us beforehand. If the spell is OSI (one single instance) then it can be done very easily with just a few variables. However, let's say you wanted this ability to work on multiple units. That changes everything.

That aside, I noticed that you can improve that trigger of yours by using only 1 Dummy for the Freezing Blizzard (Slow) ability. So instead of creating a new dummy for every single unit and ordering it to cast Slow, you can instead create the Dummy at the start of your trigger, set it's Slow ability level, and then save it as a Unit Variable such as "SlowDummy". Then in "Pick every unit in FreezingBlizzardGroup" you would only need 1 single action: "Order SlowDummy to Sorceress - Slow picked unit"

If your Dummy unit and Dummy slow abilities are setup properly then this will work fine. If it doesn't work, check to see if your Slow ability has a 0 second cooldown, 0 mana cost, and 99999 cast range and check to see if your Dummy is done correctly. I uploaded a map with a Dummy unit.
 

Attachments

  • Dummy Uncle.w3x
    16.5 KB · Views: 15
Last edited:
Level 5
Joined
Oct 20, 2019
Messages
60
thats ok, any help is appreciated =)

oh, well that is most definitely usefull for me to clarify to people in future posts =)

Yeah, my map will probably mostly have OSI in it then, didnt know about all these terms

I'll improve my trigger right away =), ty for helping
 
Status
Not open for further replies.
Top