• 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.

Custom made GUI War Stomp

Status
Not open for further replies.
Level 5
Joined
Oct 20, 2010
Messages
71
I've been tinkering with many different ways of making an ability similar to War Stomp using GUI, but all have had bugs ranging from major to minor, as all of them have, to varying degrees, left various units permanently paused in certain casting situations.

I started with code using arrays and counters similar to the way RMX used them in one of his spell packs, but that caused bugs. I've tried to make a unit stack in GUI using a few lines of custom script as well but that also had bugs.

Here is my latest "version" of the spell - it uses arrays as well as a unit group of all units that are paused. The bug with this version is that when the caster War Stomps buildings (two at a time in this case) they never unpause. Making it not target buildings isn't the solution I'd be most keen with as I'm sure it must be a logic error somewhere in my code.

If anyone can please help with any errors they spot it will be most appreciated. If anyone wants to use this code themselves - before or after its fixed - they are very welcome. :)

The code needs to be MUI and all that. Here's the code:

  • Still as Statues
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Still as Statues (Living Statue)
    • Actions
      • Set The_Real = (0.75 + (0.25 x (Real((Level of Still as Statues (Living Statue) for (Triggering unit))))))
      • Set Point = (Position of (Triggering unit))
      • Set UnitGroup = (Units within 300.00 of Point matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (100.00 + (75.00 x (Real((Level of Still as Statues (Living Statue) for (Triggering unit)))))) damage of attack type Spells and damage type Normal
          • Unit - Pause (Picked unit)
          • Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
          • Animation - Change (Picked unit)'s vertex coloring to (25.00%, 30.00%, 25.00%) with 0.00% transparency
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is in Statues_UnitGroup) Equal to True
            • Then - Actions
              • For each (Integer A) from 0 to (Number of units in Statues_UnitGroup), do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Picked unit) Equal to Statues_Unit[(Integer A)]
                      • Statues_Time[(Integer A)] Less than The_Real
                    • Then - Actions
                      • Set Statues_Time[(Integer A)] = The_Real
                    • Else - Actions
            • Else - Actions
              • Set The_Random = (Number of units in Statues_UnitGroup)
              • Set Statues_Unit[The_Random] = (Picked unit)
              • Set Statues_Time[The_Random] = The_Real
              • Set Statues_Num = (Statues_Num + 1)
              • Unit Group - Add (Picked unit) to Statues_UnitGroup
      • Custom script: call DestroyGroup (udg_UnitGroup)
      • Custom script: call RemoveLocation (udg_Point)
      • Trigger - Turn on INITIALLY OFF Still as Statues Loop <gen>
  • INITIALLY OFF Still as Statues Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 0 to Statues_Num, do (Actions)
        • Loop - Actions
          • Set Statues_Time[(Integer A)] = (Statues_Time[(Integer A)] - 0.05)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • Statues_Time[(Integer A)] Equal to 0.00
                  • (Statues_Unit[(Integer A)] is alive) Equal to False
            • Then - Actions
              • Unit Group - Remove Statues_Unit[(Integer A)] from UnitGroup
              • Animation - Change Statues_Unit[(Integer A)]'s animation speed to 100.00% of its original speed
              • Animation - Change Statues_Unit[(Integer A)]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
              • Unit - Unpause Statues_Unit[(Integer A)]
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Statues_UnitGroup) Equal to 0
        • Then - Actions
          • Set Statues_Num = 0
          • Trigger - Turn off (This trigger)
        • Else - Actions
 
Level 5
Joined
Oct 20, 2010
Messages
71
I've been putting off using hashtables for ages... but with your encouragement I went an read http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/hashtables-mui-133407/ to learn how to use them, and this is what I have come up with:

  • Still as Statues
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Still as Statues (Living Statue)
    • Actions
      • Set The_Duration = (0.75 + (0.25 x (Real((Level of Still as Statues (Living Statue) for (Triggering unit))))))
      • Set Point = (Position of (Triggering unit))
      • Set UnitGroup = (Units within 300.00 of Point matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (100.00 + (75.00 x (Real((Level of Still as Statues (Living Statue) for (Triggering unit)))))) damage of attack type Spells and damage type Normal
          • Unit - Pause (Picked unit)
          • Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
          • Animation - Change (Picked unit)'s vertex coloring to (25.00%, 30.00%, 25.00%) with 0.00% transparency
          • Hashtable - Save The_Duration as 0 of (Key (Picked unit)) in Statues_Hash
          • Unit Group - Add (Picked unit) to Statues_UnitGroup
      • Custom script: call DestroyGroup (udg_UnitGroup)
      • Custom script: call RemoveLocation (udg_Point)
      • Trigger - Turn on INITIALLY OFF Still as Statues Loop <gen>
  • INITIALLY OFF Still as Statues Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Statues_UnitGroup and do (Actions)
        • Loop - Actions
          • Set The_Duration = (Load 0 of (Key (Picked unit)) from Statues_Hash)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • The_Duration Greater than 0.00
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • Hashtable - Save (The_Duration - 0.05) as 0 of (Key (Picked unit)) in Statues_Hash
            • Else - Actions
              • Unit Group - Remove (Picked unit) from Statues_UnitGroup
              • Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
              • Animation - Change (Picked unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
              • Unit - Unpause (Picked unit)
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Statues_Hash
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Statues_UnitGroup) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
You say I mustn't use global unit groups... but both that tutorial as well this one: http://www.hiveworkshop.com/forums/...9/complete-beginners-guide-hashtables-197381/ use them. Why do I need to throw the unit group into a hashtable?

Thanks a lot for the response. :)
 
Level 5
Joined
Oct 20, 2010
Messages
71
Thanks - I'm always keen to improve all round efficiency :)

How's this?
  • Still as Statues
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Still as Statues (Living Statue)
    • Actions
      • Set The_Duration = (0.75 + (0.25 x (Real((Level of Still as Statues (Living Statue) for (Triggering unit))))))
      • Set The_Damage = (100.00 + (75.00 x (Real((Level of Still as Statues (Living Statue) for (Triggering unit))))))
      • Set The_Caster = (Triggering unit)
      • Set Point = (Position of (Triggering unit))
      • Set UnitGroup = (Units within 300.00 of Point matching ((((Matching unit) belongs to an enemy of (Owner of The_Caster)) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • Set The_Target = (Picked unit)
          • Unit - Cause The_Caster to damage The_Target, dealing The_Damage damage of attack type Spells and damage type Normal
          • Unit - Pause The_Target
          • Animation - Change The_Target's animation speed to 0.00% of its original speed
          • Animation - Change The_Target's vertex coloring to (25.00%, 30.00%, 25.00%) with 0.00% transparency
          • Hashtable - Save The_Duration as 0 of (Key (Picked unit)) in Statues_Hash
          • Unit Group - Add The_Target to Statues_UnitGroup
      • Custom script: call DestroyGroup (udg_UnitGroup)
      • Custom script: call RemoveLocation (udg_Point)
      • Trigger - Turn on INITIALLY OFF Still as Statues Loop <gen>
  • INITIALLY OFF Still as Statues Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Statues_UnitGroup and do (Actions)
        • Loop - Actions
          • Set The_Duration = (Load 0 of (Key (Picked unit)) from Statues_Hash)
          • Set The_Target = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • The_Duration Greater than 0.00
              • (The_Target is alive) Equal to True
            • Then - Actions
              • Hashtable - Save (The_Duration - 0.05) as 0 of (Key (Picked unit)) in Statues_Hash
            • Else - Actions
              • Unit Group - Remove The_Target from Statues_UnitGroup
              • Animation - Change The_Target's animation speed to 100.00% of its original speed
              • Animation - Change The_Target's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
              • Unit - Unpause The_Target
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Statues_Hash
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Statues_UnitGroup) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
You set trig unit into a var after you've used trig unit twice. Then you don't use the var after you've set it.

Number of units in group is performance heavy action, you could use an integer instead. Increase it when adding a unit into the group, decrease when removing.

Do the count == 0 check only after removing a unit from the group.
 
Level 5
Joined
Oct 20, 2010
Messages
71
About that trig unit... haha... guess I'm a bit tired at this time of day.

I tried to +rep you (Maker) for your help but apparently I haven't given enough people rep since I last +repped you - which I think was yesterday. Mckill2009 gets +rep tho. :)

  • Still as Statues
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Still as Statues (Living Statue)
    • Actions
      • Set The_Caster = (Triggering unit)
      • Set The_Duration = (0.75 + (0.25 x (Real((Level of Still as Statues (Living Statue) for The_Caster)))))
      • Set The_Damage = (100.00 + (75.00 x (Real((Level of Still as Statues (Living Statue) for The_Caster)))))
      • Set Point = (Position of (The_Caster))
      • Set UnitGroup = (Units within 300.00 of Point matching ((((Matching unit) belongs to an enemy of (Owner of The_Caster)) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • Set Num_Statues = (Num_Statues + 1)
          • Set The_Target = (Picked unit)
          • Unit - Cause The_Caster to damage The_Target, dealing The_Damage damage of attack type Spells and damage type Normal
          • Unit - Pause The_Target
          • Animation - Change The_Target's animation speed to 0.00% of its original speed
          • Animation - Change The_Target's vertex coloring to (25.00%, 30.00%, 25.00%) with 0.00% transparency
          • Hashtable - Save The_Duration as 0 of (Key (Picked unit)) in Statues_Hash
          • Unit Group - Add The_Target to Statues_UnitGroup
      • Custom script: call DestroyGroup (udg_UnitGroup)
      • Custom script: call RemoveLocation (udg_Point)
      • Trigger - Turn on INITIALLY OFF Still as Statues Loop <gen>
  • INITIALLY OFF Still as Statues Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Statues_UnitGroup and do (Actions)
        • Loop - Actions
          • Set The_Duration = (Load 0 of (Key (Picked unit)) from Statues_Hash)
          • Set The_Target = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • The_Duration Greater than 0.00
              • (The_Target is alive) Equal to True
            • Then - Actions
              • Hashtable - Save (The_Duration - 0.05) as 0 of (Key (Picked unit)) in Statues_Hash
            • Else - Actions
              • Set Num_Statues = (Num_Statues - 1)
              • Unit Group - Remove The_Target from Statues_UnitGroup
              • Animation - Change The_Target's animation speed to 100.00% of its original speed
              • Animation - Change The_Target's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
              • Unit - Unpause The_Target
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Statues_Hash
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Num_Statues Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
 
Last edited:
to save the handleId to an integer variable...
  • Set The_Target = (Picked unit)
  • Custom script: set udg_ID = GetHandleId(udg_The_Target)
  • Set The_Duration = (Load 0 of (Key (ID)) from Statues_Hash)
be warned that child key's can be overwritten...
Hashtable - Save The_Duration as 0 of (Key (Picked unit)) in Statues_Hash

for example special effects, you should check if it has saved already an effect then save it in a hashtable, otherwise the sfx will stay forever...

--->
Owner of The_Caster = TriggeringPlayer

save the vertex & animation also, checking it if it's already saved like the effects I mentioned...
 
Level 5
Joined
Oct 20, 2010
Messages
71
Awesome. For that custom script I had to make "ID" an integer and say "Load 0 of ID from Statues_Hash" though - if I made it a handle and said "Load 0 of Key(ID)..." it gave a type mismatch error.

In this http://www.hiveworkshop.com/forums/...9/complete-beginners-guide-hashtables-197381/ it says that I shouldn't use more than 10 hashtables in my map, so I should throw multiple abilities into the same hashtable etc. Won't this cause difficulties when I clear the child hashtables?

-> Lets say that for this spell I use

  • Hashtable - Save The_Duration as 0 of ID in Statues_Hash
  • Hashtable - Save Whatever as 1 of ID in Statues_Hash
  • Hashtable - Save Whatever_else as 2 of ID in Statues_Hash
Then for my next spell I use

  • Hashtable - Save The_Duration as 3 of ID in Statues_Hash
  • Hashtable - Save Whatever as 4 of ID in Statues_Hash
  • Hashtable - Save Whatever_else as 5 of ID in Statues_Hash
Surely if these two different spells are involving the same unit, when one ends and the child tables get cleared, it will cause chaos for the other spell? It would be possible to check that the unit isn't being used in any spells (run through all the spell unit groups) but that seems messy. Am I looking at this in the wrong way - is that not how I use one hashtable for multiple spells?

Here's my latest code - am I correctly checking that the vertex and anims aren't already stored?

  • Still as Statues
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Still as Statues (Living Statue)
    • Actions
      • Set The_Caster = (Triggering unit)
      • Set The_Caster_Owner = (Triggering player)
      • Set The_Duration = (0.75 + (0.25 x (Real((Level of Still as Statues (Living Statue) for The_Caster)))))
      • Set The_Damage = (100.00 + (75.00 x (Real((Level of Still as Statues (Living Statue) for The_Caster)))))
      • Set Point = (Position of The_Caster)
      • Set UnitGroup = (Units within 300.00 of Point matching ((((Matching unit) belongs to an enemy of The_Caster_Owner) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • Set Num_Statues = (Num_Statues + 1)
          • Set The_Target = (Picked unit)
          • Custom script: set udg_ID = GetHandleId(udg_The_Target)
          • Hashtable - Save The_Duration as 0 of ID in Statues_Hash
          • Unit - Cause The_Caster to damage The_Target, dealing The_Damage damage of attack type Spells and damage type Normal
          • Unit - Pause The_Target
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (1 is stored as a Boolean of ID in Statues_Hash) Equal to False
            • Then - Actions
              • Animation - Change The_Target's animation speed to 0.00% of its original speed
              • Animation - Change The_Target's vertex coloring to (25.00%, 30.00%, 25.00%) with 0.00% transparency
              • Hashtable - Save True as 1 of ID in Statues_Hash
            • Else - Actions
          • Unit Group - Add The_Target to Statues_UnitGroup
      • Custom script: call DestroyGroup (udg_UnitGroup)
      • Custom script: call RemoveLocation (udg_Point)
      • Trigger - Turn on INITIALLY OFF Still as Statues Loop <gen>
  • INITIALLY OFF Still as Statues Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Statues_UnitGroup and do (Actions)
        • Loop - Actions
          • Set The_Duration = (Load 0 of (Key (Picked unit)) from Statues_Hash)
          • Set The_Target = (Picked unit)
          • Custom script: set udg_ID = GetHandleId(udg_The_Target)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • The_Duration Greater than 0.00
              • (The_Target is alive) Equal to True
            • Then - Actions
              • Hashtable - Save (The_Duration - 0.05) as 0 of (Key (Picked unit)) in Statues_Hash
            • Else - Actions
              • Set Num_Statues = (Num_Statues - 1)
              • Unit Group - Remove The_Target from Statues_UnitGroup
              • Animation - Change The_Target's animation speed to 100.00% of its original speed
              • Animation - Change The_Target's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
              • Unit - Unpause The_Target
              • Hashtable - Clear all child hashtables of child ID in Statues_Hash
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Num_Statues Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
^You're not fully utilizing the ID. You still have some Key(PickedUnit)s there.

You can store an integer when you store stuff into a hashtable. Before clearing child hashtable, check the integer.

Increase/decrease the integer when a spell starts/ends, so you know how many spells are running for the unit using the same hashtable.

For the keys, you can give each spell a key multiplier.

For example, for spell 1 you give key 10. For spell 2, you give key 30. For spell 3, give key 50.

Then the key for storing data is
1*spellKey // Save damage
2*spellKey // Caster
3*spellKey // Duration

Spell 1 gets keys 10, 20, 30
Spell 2 gets keys 30, 60, 90
Spell 3 gets keys 50, 100, 150

This was a bad example as it wastes many keys. A better solution could be 1+spellKey, and spellKeys being 0, 20, 40

Spell 1 gets keys 1, 2, 3
Spell 2 gets keys 21, 22, 23
Spell 3 gets keys 41, 42, 43

This reserves 20 keys for each spell.
 
Level 5
Joined
Oct 20, 2010
Messages
71
if you have different ParentId, it shouldnt matter if you have keys like 1,2,3...

You mean for different spells I can just add them to the same hashtable and it wont overwrite the data?

Spell 1 starts:
  • Hashtable - Save The_Duration as 0 of ID in Statues_Hash
  • Hashtable - Save Whatever as 1 of ID in Statues_Hash
  • Hashtable - Save Whatever_else as 2 of ID in Statues_Hash
Spell 2 starts:
  • Hashtable - Save The_Duration as 0 of ID in Statues_Hash
  • Hashtable - Save Whatever as 1 of ID in Statues_Hash
  • Hashtable - Save Whatever_else as 2 of ID in Statues_Hash
Spell 1 ends:
  • Hashtable - Clear all child hashtables of child ID in Statues_Hash
Are you saying that that will work fine, and I don't need to use the method Maker suggested in order to prevent bugs? Are you saying that spell 1 will create a different ID for the unit to the ID created for spell 2, even if they target the same unit?

[EDIT] I've just tested two different spells that use different values for The_Duration and the spells do interfere, so how do I make them have different ParentId?
 
Last edited:
Level 5
Joined
Oct 20, 2010
Messages
71
I've been busy with work the past few days but I've updated about 5 spells of mine for the next version of my map, all using variations of the following code.

The value of "SpellID_Statues" is initialized to 1.

The idea is that the 0 value of any ID will be the number of spells using this system that are currently affecting the unit, so when that value = 0 the child hashtables of that unit can be cleared.

Is this MUI? Any errors?

  • Still as Statues
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Still as Statues (Living Statue)
    • Actions
      • Set The_Caster = (Triggering unit)
      • Set The_Caster_Owner = (Triggering player)
      • Set The_Duration = (0.75 + (0.25 x (Real((Level of Still as Statues (Living Statue) for The_Caster)))))
      • Set The_Damage = (100.00 + (75.00 x (Real((Level of Still as Statues (Living Statue) for The_Caster)))))
      • Set Point = (Position of The_Caster)
      • Set UnitGroup = (Units within 300.00 of Point matching ((((Matching unit) belongs to an enemy of The_Caster_Owner) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • Set Num_Statues = (Num_Statues + 1)
          • Set The_Target = (Picked unit)
          • Custom script: set udg_ID = GetHandleId(udg_The_Target)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (The_Target is in Statues_UnitGroup) Equal to False
            • Then - Actions
              • Unit Group - Add The_Target to Statues_UnitGroup
              • Hashtable - Save ((Load 0 of ID from Ability_Hash) + 1) as 0 of ID in Ability_Hash
            • Else - Actions
          • Hashtable - Save The_Duration as (0 + SpellID_Statues) of ID in Ability_Hash
          • Unit - Cause The_Caster to damage The_Target, dealing The_Damage damage of attack type Spells and damage type Normal
          • Unit - Pause The_Target
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((1 + SpellID_Statues) is stored as a Boolean of ID in Ability_Hash) Equal to False
            • Then - Actions
              • Animation - Change The_Target's animation speed to 0.00% of its original speed
              • Animation - Change The_Target's vertex coloring to (25.00%, 30.00%, 25.00%) with 0.00% transparency
              • Hashtable - Save True as (1 + SpellID_Statues) of ID in Ability_Hash
            • Else - Actions
      • Custom script: call DestroyGroup (udg_UnitGroup)
      • Custom script: call RemoveLocation (udg_Point)
      • Trigger - Turn on INITIALLY OFF Still as Statues Loop <gen>
  • INITIALLY OFF Still as Statues Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Statues_UnitGroup and do (Actions)
        • Loop - Actions
          • Set The_Target = (Picked unit)
          • Custom script: set udg_ID = GetHandleId(udg_The_Target)
          • Set The_Duration = (Load (0 + SpellID_Statues) of ID from Ability_Hash)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • The_Duration Greater than 0.00
              • (The_Target is alive) Equal to True
            • Then - Actions
              • Hashtable - Save (The_Duration - 0.05) as (0 + SpellID_Statues) of ID in Ability_Hash
            • Else - Actions
              • Set Num_Statues = (Num_Statues - 1)
              • Unit Group - Remove The_Target from Statues_UnitGroup
              • Animation - Change The_Target's animation speed to 100.00% of its original speed
              • Animation - Change The_Target's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
              • Unit - Unpause The_Target
              • Set The_Num_Groups = ((Load 0 of ID from Ability_Hash) - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • The_Num_Groups Equal to 0
                • Then - Actions
                  • Hashtable - Clear all child hashtables of child ID in Ability_Hash
                • Else - Actions
                  • Hashtable - Save The_Num_Groups as 0 of ID in Ability_Hash
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Num_Statues Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
 
Status
Not open for further replies.
Top