• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Spell] gravity lapse

Status
Not open for further replies.
Level 5
Joined
Aug 14, 2020
Messages
118
gravity lapse:

sends all units in air for 5 seconds (1 extra second per level) the units which are in air can't move or attack but they can take damage from other units (even land units).

well, I know I should use add crow ability to units then use animations to change the height but I never worked with it,I don't know what is a good speed for them and.....
also I have a few idea for making them unmoveable I thought I might be able to use entangling roots but I don't think it be a good idea
can someone help me with it?(spell is not MUI)

extra question: does anyone know how can I convert a dds icon to blp (from reforged to classic)?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,535
For your icon question: BLP Lab v0.5.0
Load the .dds then save it as a .blp.

Gravity Lapse:
I'd use Storm Bolt to stun the gravity lapsed units. Entangling Roots has buggy interactions with Flying Height, at least last I tried on current patch.

So the trigger would look something like this:
  • Events:
  • A unit starts the effect of an ability
  • Conditions:
  • Ability being cast = Gravity Lapse
  • Actions:
  • Set tempPoint = target point of ability being cast
  • Create 1 Dummy at tempPoint
  • Add Storm Bolt to last created unit
  • Custom script: set bj_wantDestroyGroup = true
  • Pick every unit within X range of tempPoint and do actions:
  • If Then Else
  • ->If picked unit is alive
  • ->If picked unit is enemy
  • Then do actions:
  • ->Order Dummy to Storm Bolt picked unit
  • ->Add picked unit to GravityLapseGroup
  • Else (nothing happens)
  • ---------------------------------
  • Set GravityLift = true
  • Turn on GravityLapseLoop
  • Wait 5.01 seconds (+1.00 per level)
  • Turn off GravityLapseLoop
  • Remove all units from GravityLapseGroup
Then in GravityLapseLoop:
  • Events:
  • Every 0.50 seconds
  • Actions:
  • Pick every unit in GravityLapseGroup and do actions:
  • If GravityLift = true then
  • ->Set GravityLift = false
  • ->Change picked unit flying height to 300 at 150
  • Else
  • ->Set GravityLift = true
  • ->Change picked unit flying height to 0 at 150
If your Dummy is setup correctly then you should only need 1 Dummy to handle all of the Storm Bolts. Don't forget an expiration timer for the Dummy and to clean up the point leaks. You'll probably want to check if the picked units are Dead inside GravityLapseLoop so you can remove them if they die, otherwise their corpse will continue to rise/fall.

variables:
GravityLift = Boolean
GravityLapseGroup = Unit Group
tempPoint = Point
 
Last edited:
Level 5
Joined
Aug 14, 2020
Messages
118
For your icon question: BLP Lab v0.5.0
Load the .dds then save it as a .blp.

Gravity Lapse:
I'd use Storm Bolt to stun the gravity lapsed units. Entangling Roots has buggy interactions with Flying Height, at least last I tried on current patch.

So the trigger would look something like this:
  • Events:
  • A unit starts the effect of an ability
  • Conditions:
  • Ability being cast = Gravity Lapse
  • Actions:
  • Set tempPoint = target point of ability being cast
  • Create 1 Dummy at tempPoint
  • Add Storm Bolt to last created unit
  • Custom script: set bj_wantDestroyGroup = true
  • Pick every unit within X range of tempPoint and do actions:
  • If Then Else
  • ->If picked unit is alive
  • ->If picked unit is enemy
  • Then do actions:
  • ->Order Dummy to Storm Bolt picked unit
  • ->Add picked unit to GravityLapseGroup
  • Else (nothing happens)
  • ---------------------------------
  • Set GravityLift = true
  • Turn on GravityLapseLoop
  • Wait 5.01 seconds (+1.00 per level)
  • Turn off GravityLapseLoop
  • Remove all units from GravityLapseGroup
Then in GravityLapseLoop:
  • Events:
  • Every 0.50 seconds
  • Actions:
  • Pick every unit in GravityLapseGroup and do actions:
  • If GravityLift = true then
  • ->Set GravityLift = false
  • ->Change picked unit flying height to 300 at 150
  • Else
  • ->Set GravityLift = true
  • ->Change picked unit flying height to 0 at 150
If your Dummy is setup correctly then you should only need 1 Dummy to handle all of the Storm Bolts. Don't forget an expiration timer for the Dummy and to clean up the point leaks. You'll probably want to check if the picked units are Dead inside GravityLapseLoop so you can remove them if they die, otherwise their corpse will continue to rise/fall.

variables:
GravityLift = Boolean
GravityLapseGroup = Unit Group
tempPoint = Point
I did it as u said uncle but didn't work on all,
can u check it for me if u have time?
 

Attachments

  • spellUncle.w3x
    89.6 KB · Views: 17

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,535
Your Dummy wasn't setup correctly and neither was your Storm Bolt ability.

I explain how to setup a dummy here: Dummy Casting Problem

Make sure your Dummy abilities have no cooldown, mana cost, 99999 cast range, etc... So that the Dummy can cast it properly.

Some other issues:
-You were Destroying GravityLapseGroup which you shouldn't do (it doesn't leak).
-The Gravity Lapse Loop should be Initially OFF. That's why we Turn it On.
-The level of the Dummy ability wasn't being set.

I also added some things to the trigger you might notice. The whole IsUnitInRangeLoc custom script is a bit confusing but it basically fixes an issue that Pick Every Unit within Range has.

Pick every unit within range doesn't take into consideration unit collision when finding units whereas normal non-triggered AoE abilities do. That's where IsUnitInRangeLoc comes into play. This DOES take unit collision into consideration, however, we can only check if 1 Unit is in range at a time, so we need to combine it with our Pick Every Unit function. To do this I increase the Pick Every Unit AoE by +300 and then filter out units that aren't InRange of it. This results in TRUE 300 Area of Effect, it's the same type of AoE that a normal non-triggered spell would use.

  • Gravity Lapse
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Gravity Lapse
    • Actions
      • Set VariableSet GL_Point = (Target point of ability being cast)
      • Set VariableSet GL_Time = (4 + (Level of (Ability being cast) for (Triggering unit)))
      • Set VariableSet GL_AoE = 300.00
      • -------- --------
      • Unit - Create 1 Dummy for (Triggering player) at GL_Point facing Default building facing degrees
      • Set VariableSet GL_Dummy = (Last created unit)
      • Unit - Add Gravity Lapse Stun to GL_Dummy
      • Unit - Set level of Gravity Lapse Stun for (Last created unit) to (Level of (Ability being cast) for (Triggering unit))
      • Unit - Add a 0.50 second Generic expiration timer to GL_Dummy
      • -------- --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within (GL_AoE + 300.00) of GL_Point.) 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 alive) Equal to True
              • ((Picked unit) is A structure) Equal to False
              • ((Picked unit) is A ground unit) Equal to True
            • Then - Actions
              • Custom script: if IsUnitInRangeLoc(GetEnumUnit(), udg_GL_Point, udg_GL_AoE) then
              • Unit Group - Add (Picked unit) to GravityLapseGroup
              • Unit - Order GL_Dummy to Human Mountain King - Storm Bolt (Picked unit)
              • Custom script: endif
            • Else - Actions
      • Custom script: call RemoveLocation (udg_GL_Point)
      • -------- --------
      • Set VariableSet GravityLapse = True
      • Trigger - Turn on Gravity Lapse Loop <gen>
      • Wait (0.01 + (Real(GL_Time))) seconds
      • Trigger - Turn off Gravity Lapse Loop <gen>
      • Unit Group - Pick every unit in GravityLapseGroup and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit) flying height to 0.00 at 400.00
      • Unit Group - Remove all units from GravityLapseGroup.
  • Gravity Lapse Loop
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in GravityLapseGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GravityLapse Equal to True
                • Then - Actions
                  • Set VariableSet GravityLapse = False
                  • Animation - Change (Picked unit) flying height to 200.00 at 400.00
                • Else - Actions
                  • Set VariableSet GravityLapse = True
                  • Animation - Change (Picked unit) flying height to 0.00 at 400.00
            • Else - Actions
              • -------- Remove dead units --------
              • Animation - Change (Picked unit) flying height to 0.00 at 400.00
              • Unit Group - Remove (Picked unit) from GravityLapseGroup.
These two triggers will automatically add/remove Storm Crow Form from units:
  • GUI Autofly 1
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Add/Remove Storm Crow Form from all units (except units that already have it) --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Custom script: if UnitAddAbility(GetEnumUnit(), 'Amrf') and UnitRemoveAbility(GetEnumUnit(), 'Amrf') then
          • Custom script: endif
  • GUI Autofly 2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • -------- Add/Remove Storm Crow Form from the new unit (unless it already has it) --------
      • Custom script: if UnitAddAbility(GetTriggerUnit(), 'Amrf') and UnitRemoveAbility(GetTriggerUnit(), 'Amrf') then
      • Custom script: endif
 

Attachments

  • spellUncle Fix 1.w3x
    89.8 KB · Views: 20
Last edited:
Level 5
Joined
Aug 14, 2020
Messages
118
Your Dummy wasn't setup correctly and neither was your Storm Bolt ability.

I explain how to setup a dummy here: Dummy Casting Problem

Make sure your Dummy abilities have no cooldown, mana cost, 99999 cast range, etc... So that the Dummy can cast it properly.

Some other issues:
-You were Destroying GravityLapseGroup which you shouldn't do (it doesn't leak).
-The Gravity Lapse Loop should be Initially OFF. That's why we Turn it On.
-The level of the Dummy ability wasn't being set.

I also added some things to the trigger you might notice. The whole IsUnitInRangeLoc custom script is a bit confusing but it basically fixes an issue that Pick Every Unit within Range has.

Pick every unit within range doesn't take into consideration unit collision when finding units whereas normal non-triggered AoE abilities do. That's where IsUnitInRangeLoc comes into play. This DOES take unit collision into consideration, however, we can only check if 1 Unit is in range at a time, so we need to combine it with our Pick Every Unit function. To do this I increase the Pick Every Unit AoE by +300 and then filter out units that aren't InRange of it. This is TRUE 300 Area of Effect, it's the same AoE that a normal non-triggered spell would use.

  • Gravity Lapse
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Gravity Lapse
    • Actions
      • Set VariableSet GL_Point = (Target point of ability being cast)
      • Set VariableSet GL_Time = (4 + (Level of (Ability being cast) for (Triggering unit)))
      • Set VariableSet GL_AoE = 300.00
      • -------- --------
      • Unit - Create 1 Dummy for (Triggering player) at GL_Point facing Default building facing degrees
      • Set VariableSet GL_Dummy = (Last created unit)
      • Unit - Add Gravity Lapse Stun to GL_Dummy
      • Unit - Set level of Gravity Lapse Stun for (Last created unit) to (Level of (Ability being cast) for (Triggering unit))
      • Unit - Add a 0.50 second Generic expiration timer to GL_Dummy
      • -------- --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within (GL_AoE + 300.00) of GL_Point.) 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 alive) Equal to True
              • ((Picked unit) is A structure) Equal to False
              • ((Picked unit) is A ground unit) Equal to True
            • Then - Actions
              • Custom script: if IsUnitInRangeLoc(GetEnumUnit(), udg_GL_Point, udg_GL_AoE) then
              • Unit Group - Add (Picked unit) to GravityLapseGroup
              • Unit - Order GL_Dummy to Human Mountain King - Storm Bolt (Picked unit)
              • Custom script: endif
            • Else - Actions
      • Custom script: call RemoveLocation (udg_GL_Point)
      • -------- --------
      • Set VariableSet GravityLapse = True
      • Trigger - Turn on Gravity Lapse Loop <gen>
      • Wait (0.01 + (Real(GL_Time))) seconds
      • Trigger - Turn off Gravity Lapse Loop <gen>
      • Unit Group - Pick every unit in GravityLapseGroup and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit) flying height to 0.00 at 400.00
      • Unit Group - Remove all units from GravityLapseGroup.
  • Gravity Lapse Loop
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in GravityLapseGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GravityLapse Equal to True
                • Then - Actions
                  • Set VariableSet GravityLapse = False
                  • Animation - Change (Picked unit) flying height to 200.00 at 400.00
                • Else - Actions
                  • Set VariableSet GravityLapse = True
                  • Animation - Change (Picked unit) flying height to 0.00 at 400.00
            • Else - Actions
              • -------- Remove dead units --------
              • Animation - Change (Picked unit) flying height to 0.00 at 400.00
              • Unit Group - Remove (Picked unit) from GravityLapseGroup.
These two triggers will automatically add/remove Storm Crow Form from units:
  • GUI Autofly 1
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Add/Remove Storm Crow Form from all units (except units that already have it) --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Custom script: if UnitAddAbility(GetEnumUnit(), 'Amrf') and UnitRemoveAbility(GetEnumUnit(), 'Amrf') then
          • Custom script: endif
  • GUI Autofly 2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • -------- Add/Remove Storm Crow Form from the new unit (unless it already has it) --------
      • Custom script: if UnitAddAbility(GetTriggerUnit(), 'Amrf') and UnitRemoveAbility(GetTriggerUnit(), 'Amrf') then
      • Custom script: endif

U R an angle uncle,thank u so much♡
 
Level 5
Joined
Aug 14, 2020
Messages
118
Your Dummy wasn't setup correctly and neither was your Storm Bolt ability.

I explain how to setup a dummy here: Dummy Casting Problem

Make sure your Dummy abilities have no cooldown, mana cost, 99999 cast range, etc... So that the Dummy can cast it properly.

Some other issues:
-You were Destroying GravityLapseGroup which you shouldn't do (it doesn't leak).
-The Gravity Lapse Loop should be Initially OFF. That's why we Turn it On.
-The level of the Dummy ability wasn't being set.

I also added some things to the trigger you might notice. The whole IsUnitInRangeLoc custom script is a bit confusing but it basically fixes an issue that Pick Every Unit within Range has.

Pick every unit within range doesn't take into consideration unit collision when finding units whereas normal non-triggered AoE abilities do. That's where IsUnitInRangeLoc comes into play. This DOES take unit collision into consideration, however, we can only check if 1 Unit is in range at a time, so we need to combine it with our Pick Every Unit function. To do this I increase the Pick Every Unit AoE by +300 and then filter out units that aren't InRange of it. This results in TRUE 300 Area of Effect, it's the same type of AoE that a normal non-triggered spell would use.

  • Gravity Lapse
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Gravity Lapse
    • Actions
      • Set VariableSet GL_Point = (Target point of ability being cast)
      • Set VariableSet GL_Time = (4 + (Level of (Ability being cast) for (Triggering unit)))
      • Set VariableSet GL_AoE = 300.00
      • -------- --------
      • Unit - Create 1 Dummy for (Triggering player) at GL_Point facing Default building facing degrees
      • Set VariableSet GL_Dummy = (Last created unit)
      • Unit - Add Gravity Lapse Stun to GL_Dummy
      • Unit - Set level of Gravity Lapse Stun for (Last created unit) to (Level of (Ability being cast) for (Triggering unit))
      • Unit - Add a 0.50 second Generic expiration timer to GL_Dummy
      • -------- --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within (GL_AoE + 300.00) of GL_Point.) 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 alive) Equal to True
              • ((Picked unit) is A structure) Equal to False
              • ((Picked unit) is A ground unit) Equal to True
            • Then - Actions
              • Custom script: if IsUnitInRangeLoc(GetEnumUnit(), udg_GL_Point, udg_GL_AoE) then
              • Unit Group - Add (Picked unit) to GravityLapseGroup
              • Unit - Order GL_Dummy to Human Mountain King - Storm Bolt (Picked unit)
              • Custom script: endif
            • Else - Actions
      • Custom script: call RemoveLocation (udg_GL_Point)
      • -------- --------
      • Set VariableSet GravityLapse = True
      • Trigger - Turn on Gravity Lapse Loop <gen>
      • Wait (0.01 + (Real(GL_Time))) seconds
      • Trigger - Turn off Gravity Lapse Loop <gen>
      • Unit Group - Pick every unit in GravityLapseGroup and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit) flying height to 0.00 at 400.00
      • Unit Group - Remove all units from GravityLapseGroup.
  • Gravity Lapse Loop
    • Events
      • Time - 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in GravityLapseGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GravityLapse Equal to True
                • Then - Actions
                  • Set VariableSet GravityLapse = False
                  • Animation - Change (Picked unit) flying height to 200.00 at 400.00
                • Else - Actions
                  • Set VariableSet GravityLapse = True
                  • Animation - Change (Picked unit) flying height to 0.00 at 400.00
            • Else - Actions
              • -------- Remove dead units --------
              • Animation - Change (Picked unit) flying height to 0.00 at 400.00
              • Unit Group - Remove (Picked unit) from GravityLapseGroup.
These two triggers will automatically add/remove Storm Crow Form from units:
  • GUI Autofly 1
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Add/Remove Storm Crow Form from all units (except units that already have it) --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Custom script: if UnitAddAbility(GetEnumUnit(), 'Amrf') and UnitRemoveAbility(GetEnumUnit(), 'Amrf') then
          • Custom script: endif
  • GUI Autofly 2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • -------- Add/Remove Storm Crow Form from the new unit (unless it already has it) --------
      • Custom script: if UnitAddAbility(GetTriggerUnit(), 'Amrf') and UnitRemovUnitRemorf') then
      • Custom script: endi
Your Dummy wasn't setup correctly and neither was your Storm Bolt ability.

I explain how to setup a dummy here: Dummy Casting Problem

Make sure your Dummy abilities have no cooldown, mana cost, 99999 cast range, etc... So that the Dummy can cast it properly.

Some other issues:
-You were Destroying GravityLapseGroup which you shouldn't do (it doesn't leak).
-The Gravity Lapse Loop should be Initially OFF. That's why we Turn it On.
-The level of the Dummy ability wasn't being set.

I also added some things to the trigger you might notice. The whole IsUnitInRangeLoc custom script is a bit confusing but it basically fixes an issue that Pick Every Unit within Range has.

Pick every unit within range doesn't take into consideration unit collision when finding units whereas normal non-triggered AoE abilities do. That's where IsUnitInRangeLoc comes into play. This DOES take unit collision into consideration, however, we can only check if 1 Unit is in range at a time, so we need to combine it with our Pick Every Unit function. To do this I increase the Pick Every Unit AoE by +300 and then filter out units that aren't InRange of it. This results in TRUE 300 Area of Effect, it's the same type of AoE that a normal non-triggered spell would use.

  • Gravity Lapse
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Gravity Lapse
    • Actions
      • Set VariableSet GL_Point = (Target point of ability being cast)
      • Set VariableSet GL_Time = (4 + (Level of (Ability being cast) for (Triggering unit)))
      • Set VariableSet GL_AoE = 300.00
      • -------- --------
      • Unit - Create 1 Dummy for (Triggering player) at GL_Point facing Default building facing degrees
      • Set VariableSet GL_Dummy = (Last created unit)
      • Unit - Add Gravity Lapse Stun to GL_Dummy
      • Unit - Set level of Gravity Lapse Stun for (Last created unit) to (Level of (Ability being cast) for (Triggering unit))
      • Unit - Add a 0.50 second Generic expiration timer to GL_Dummy
      • -------- --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within (GL_AoE + 300.00) of GL_Point.) 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 alive) Equal to True
              • ((Picked unit) is A structure) Equal to False
              • ((Picked unit) is A ground unit) Equal to True
            • Then - Actions
              • Custom script: if IsUnitInRangeLoc(GetEnumUnit(), udg_GL_Point, udg_GL_AoE) then
              • Unit Group - Add (Picked unit) to GravityLapseGroup
              • Unit - Order GL_Dummy to Human Mountain King - Storm Bolt (Picked unit)
              • Custom script: endif
            • Else - Actions
      • Custom script: call RemoveLocation (udg_GL_Point)
      • -------- --------
      • Set VariableSet GravityLapse = True
      • Trigger - Turn on Gravity Lapse Loop <gen>
      • Wait (0.01 + (Real(GL_Time))) seconds
      • Trigger - Turn off Gravity Lapse Loop <gen>
      • Unit Group - Pick every unit in GravityLapseGroup and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit) flying height to 0.00 at 400.00
      • Unit Group - Remove all units from GravityLapseGroup.
  • Gravity Lapse Loop
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in GravityLapseGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GravityLapse Equal to True
                • Then - Actions
                  • Set VariableSet GravityLapse = False
                  • Animation - Change (Picked unit) flying height to 200.00 at 400.00
                • Else - Actions
                  • Set VariableSet GravityLapse = True
                  • Animation - Change (Picked unit) flying height to 0.00 at 400.00
            • Else - Actions
              • -------- Remove dead units --------
              • Animation - Change (Picked unit) flying height to 0.00 at 400.00
              • Unit Group - Remove (Picked unit) from GravityLapseGroup.
These two triggers will automatically add/remove Storm Crow Form from units:
  • GUI Autofly 1
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Add/Remove Storm Crow Form from all units (except units that already have it) --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Custom script: if UnitAddAbility(GetEnumUnit(), 'Amrf') and UnitRemoveAbility(GetEnumUnit(), 'Amrf') then
          • Custom script: endif
  • GUI Autofly 2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • -------- Add/Remove Storm Crow Form from the new unit (unless it already has it) --------
      • Custom script: if UnitAddAbility(GetTriggerUnit(), 'Amrf') and UnitRemoveAbility(GetTriggerUnit(), 'Amrf') then
      • Custom script: endif
just I didn't understand what does this one do
  • custom script: bj_wantDestroyGroup
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,535
Once bj_wantDestroyGroup is set to true it destroys the next unit group created. It's not the safest thing to use though so I wouldn't recommend making a habit out of it. The way I used it is fine though.

And destroying Points/Groups/Forces/etc... is to avoid memory leaks. You can read more about it in "Things That Leak" in my signature.
 
Status
Not open for further replies.
Top