• 🏆 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!

[Solved] Why this happens?

Status
Not open for further replies.
Level 24
Joined
Jun 26, 2020
Messages
1,852
Pls see this video to understand Demostracion2.mp4
I wanna know if "Ethereal" its a very special type of unit and I have to consider that.
Correction: I think is not inmune, he get "repelled" instead of pulled, seriously why?

These are the triggers:

  • Vortice
    • Events
      • Unit - A unit begins to channel an ability
    • Conditions
      • ((Ability being cast) Equal to Vortex (Hero/The good)) or ((Ability being cast) Equal to Vortex (The good))
    • Actions
      • Unit Group - Add (Casting unit) to Vortex_Casters
      • Set Location_Variable[57] = (Position of (Casting unit))
      • Set Location_Variable[58] = (Location_Variable[57] offset by 300.00 towards (Facing of (Casting unit)) degrees)
      • Unit - Create 1 Vortex for (Owner of (Casting unit)) at Locacion_Variable[58] facing Default building view degrees
      • Hashtable - Save Handle Of(Casting unit) as 1 of (Key (Last created unit)) in Vortex_Stats
      • Hashtable - Save Handle Of(Last created unit) as 3 of (Key (Casting unit)) in Vortex_Stats
      • Hashtable - Save (Real((Level of (Ability being cast) for (Triggering unit)))) as 4 of (Key (Last created unit)) in Vortex_Stats
      • If ((Ability being cast) Equal to Vortex (Hero)) then do (Set Vortex_area = 650.00) else do (Set Vortex_area = 450.00)
      • Environment - Create a 10.00 second Temporal crater deformation at Location_Variable[58] with radius Vortex_area and depth 96.00
      • Set Vortex_deformation[(Player number of (Owner of (Triggering unit)))] = (Last created terrain deformation)
      • Custom script: call RemoveLocation(udg_Locacion_Variable[58])
      • Custom script: call RemoveLocation(udg_Locacion_Variable[57])
      • Trigger - Turn on Vortice Traccion <gen>
  • Vortice Traccion
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set Unit_Group_Variable[27] = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Igual a Vortex) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in Grupo_Unidad_Variable[27] and do (Actions)
        • Actions Loop:
          • Set Vortex_Key = (Picked unit)
          • Set Vortex_Index = (Picked unit)
          • Set Location_Variable[59] = (Position of Vortex_Index)
          • Set Unit_Group_Variable[28] = (Units within Vortex_area of Locacion_Variable[59] matching (((((Matching unit) is An structure Equal to False) and (((Matching unit) is in Vortex_Casters) Equal to False)) or (((Matching unit) is in Vortex_entraron[(Player number of (Owner of (Load 1 of (Key Vortex_Key) in Vortex_stats)]))
          • Unit Group - Pick every unit in Grupo_Unidad_Variable[28] and do (Actions)
            • Actions Loop:
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Conditions If:
                  • ((Picked unit) belongs to an enemy of (Owner of (Load 1 of (Key Vortex_Key) in Vortex_Stats))) Equal to True
                • Actions Then:
                  • Set Location_Variable[60] = (Position of (Picked unit))
                  • Set Location_Variable[61] = (Locacion_Variable[60] offset by 2.50 towards (Angle from Locacion_Variable[60] to Location_Variable[59]) degrees)
                  • Unit - Move (Picked unit) instantly to Location_Variable[61]
                  • Custom script: call RemoveLocation(udg_Location_Variable[61])
                  • Custom script: call RemoveLocation(udg_Location_Variable[60])
                  • Unit - Cause (Load 1 of (Key Vortex_Key) in Vortex_Stats) to damage (Picked unit), dealing (0.48 + (0.52 x (Load 4 of (Key Vortex_Key) from Vortex_Stats))) damage of attack type Conjuros and damage type Universal
                • Actions Else:
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Conditions If:
                  • (Distance between (Position of (Picked unit)) and (Position of Vortex_Index)) Less or equal to a 80.00
                  • ((Picked unit) is paused) Equal to False
                  • ((Picked unit) is hidden) Equal to False
                • Actions Then:
                  • Unit - Hide (Picked unit)
                  • Unit - Pause (Picked unit)
                  • Unit Group - Add (Picked unit) to Vortex_they_entered[(Player number of (Owner of (Load 1 of (Key Vortex_Key) in Vortex_Stats)))]
                • Actions Else:
          • Unit Group - Pick every unit in Vortex_entraron[(Player number of (Owner of (Load 1 of (Key Vortex_Key) in Vortex_Stats)))] and do (If (((Picked unit) belongs to an enemy of (Load 1 of (Key Vortex_Key) in Vortex_Stats)) Equal to True) then do (Unit - Cause (Load 1 of (Key Vortex_Key) in Vortex_Stats) to damage (Triggering unit), dealing 0.90 damage of attack type Conjuros and damage typ
          • Custom script: call DestroyGroup(udg_Unit_Group_Variable[28])
          • Custom script: call RemoveLocation(udg_Location_Variable[59])
      • If ((Unit_Group_Variable[27] is empty) Equal to True) then do (Detonador - Turn off (This trigger)) else do (Do nothing)
      • Custom script: call DestroyGroup(udg_Unit_Group_Variable[27])
  • Vortice termina
    • Events
      • Unit - A unit stops the casting of an ability
    • Conditions
      • ((Ability being cast) Equal to Vortex (Hero/The good)) or ((Ability being cast) Equal to Vortex (The good))
    • Actions
      • Unit Group - Remove (Casting unit) from Vortex_Casters
      • Set Locacion_Variable[62] = (Position of (Load 3 of (Key (Triggering unit)) in Vortex_Stats))
      • Special Effect - Create a special effect at Locacion_Variable[62] using war3mapImported\Arcane Nova.mdx
      • Unit Group - Pick every unit in Vortex_entraron[(Player number of (Owner of (Triggering unit)))] and do (Actions)
        • Actions Loop:
          • Unit - Unhide (Picked unit)
          • Unit - Unpause (Picked unit)
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (150.00 + (50.00 x (Real((Level of (Ability being cast) for (Triggering unit)))))) damage of attack type Spells and damage type Universal
      • Unit Group - Remove all units from Vortex_they_enter[(Player number of (Owner of (Triggering unit)))]
      • Set Unit_Group_Variable[29] = (Units within Vortex_area of Location_Variable[62] matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
      • Unit Group - Pick every unit in Unit_Group_Variable[29] and do (Unit - Cause (Triggering unit) to damage (Picked unit), dealing (150.00 + (50.00 x (Real((Level of (Ability being cast) for (Triggering unit)))))) damage of attack type Spells and damage type Universal)
      • Custom script: call DestroyGroup(udg_Unit_Group_Variable[29])
      • Environment - Stop Vortex_deformacion[(Player number of (Owner of (Triggering unit)))] over 1.00 seconds
      • Unit - Remove (Load 3 of (Key (Triggering unit)) in Vortex_Stats) from the game
      • If ((Number of units in (Units of type Vortex)) Equal to 0) then do (Hashtable - Clear Vortex_Stats) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_Location_Variable[62])
 

Attachments

  • Demostracion2.mp4
    18.5 MB · Views: 70
Last edited:

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,195
What is happening is the unit is running away because it is is taking damage while being banished, and so unable to attack the damage source. The movement is occurring at a sub-frame level in-between the cancelations from the trigger based movement.

The solution is to pause any units caught inside the vortex. This prevents them from running away between trigger movement updates. Natural forms of pause such as stuns could also be used.

Deleting triggers stopped the bug because it broke the damage logic. As the unit was no longer taking damage it was no longer running away. Disabling the damage logic has a similar and more direct effect.
 
Level 24
Joined
Jun 26, 2020
Messages
1,852
What is happening is the unit is running away because it is is taking damage while being banished, and so unable to attack the damage source. The movement is occurring at a sub-frame level in-between the cancelations from the trigger based movement.

The solution is to pause any units caught inside the vortex. This prevents them from running away between trigger movement updates. Natural forms of pause such as stuns could also be used.

Deleting triggers stopped the bug because it broke the damage logic. As the unit was no longer taking damage it was no longer running away. Disabling the damage logic has a similar and more direct effect.
Ok, I will try that of pause that units.

Edit: Can you say me how to do a trigger for do that?, because I'm using "pause units" in some other things too.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,195
A rough idea is to use a unit group to track the paused units. Any unit affected by vortex gets added to this unit group. When the spell ends all the units in the unit group are then unpaused and the unit group is cleared for re-use next cast. This replaces the pause logic used on just the units that enter the centre, since now all units that enter any part of the vortex would be paused.

Another idea that might work would be to issue the stop order to the unit after dealing damage to it. Maybe this would cancel the flee movement. Might be worth trying out as it avoids needing to deal with pausing/stunning units.
 
Level 24
Joined
Jun 26, 2020
Messages
1,852
A rough idea is to use a unit group to track the paused units. Any unit affected by vortex gets added to this unit group. When the spell ends all the units in the unit group are then unpaused and the unit group is cleared for re-use next cast. This replaces the pause logic used on just the units that enter the centre, since now all units that enter any part of the vortex would be paused.

Another idea that might work would be to issue the stop order to the unit after dealing damage to it. Maybe this would cancel the flee movement. Might be worth trying out as it avoids needing to deal with pausing/stunning units.
Well, I thought someting similar, thanks.

Edit: Ok, the problem is solved, thanks for your help.
 
Last edited:
Status
Not open for further replies.
Top