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

Gui effects!

Status
Not open for further replies.
Level 4
Joined
Apr 23, 2008
Messages
119
  • Engage 5 attacks
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Critical Strike (100%) for (Attacking unit)) Not equal to 0
    • Actions
      • Special Effect - Create a special effect attached to the hand,left of (Attacking unit) using Abilities\Weapons\VoidWalkerMissile\VoidWalkerMissile.mdl
      • Set HandGlow = (Last created special effect)
      • Unit - Set the custom value of (Attacking unit) to ((Custom value of (Attacking unit)) + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Abs(((Custom value of (Attacking unit)) mod 6))) Equal to 0
        • Then - Actions
          • Special Effect - Destroy HandGlow
          • Unit - Remove Critical Strike (100%) from (Attacking unit)
        • Else - Actions
Basically i would like both of his hands to glow during the time he gets to crit and then back to normal when he can't. So i was wondering how to save the special effect (Hand Glow) so that when i use another special effect it won't not only be permanent but destory the last created special effect. This was the closest thing i could think of. Any one able to help out?
 
Some problems are the "unit is attacked" event can bug by pressing the stop button a lot and triggering it to happen a lot more than it should...

Using the custom value of a unit is fine on a custom map, but if you need to import systems you shouldn't use it (rather use a unit-indexing library).

When you mod something by 6, it will never return a non-absolute value. You should just omit the absolute value altogether. Although kudos for using Mod, it has so many great fundamental uses.
 
Level 4
Joined
Apr 23, 2008
Messages
119
The question is the special effects. How would i go about only making them show for the 5 attacks then disappear after, is making a dummy ability the only way?
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
This applies the effects when the 5th hit begins, and removes thenm when the 6th attack begins.


  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Melee Game - Use melee time of day (for all players)
      • Hashtable - Create a hashtable
      • Set hash = (Last created hashtable)
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set u1 = (Attacking unit)
      • Set i1 = (Load (Key hits) of (Key (Triggering unit)) from hash)
      • Set i1 = (i1 + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • i1 Less than 6
        • Then - Actions
          • Hashtable - Save i1 as (Key hits) of (Key (Triggering unit)) in hash
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • i1 Equal to 5
            • Then - Actions
              • Special Effect - Create a special effect attached to the left hand of u1 using Abilities\Spells\Orc\Bloodlust\BloodlustTarget.mdl
              • Hashtable - Save Handle Of(Last created special effect) as (Key e1) of (Key (Triggering unit)) in (Last created hashtable)
              • Special Effect - Create a special effect attached to the right hand of u1 using Abilities\Spells\Orc\Bloodlust\BloodlustTarget.mdl
              • Hashtable - Save Handle Of(Last created special effect) as (Key e2) of (Key (Triggering unit)) in (Last created hashtable)
            • Else - Actions
        • Else - Actions
          • Special Effect - Destroy (Load (Key e1) of (Key (Triggering unit)) in hash)
          • Special Effect - Destroy (Load (Key e2) of (Key (Triggering unit)) in hash)
          • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in hash


There's also a boolean: Hashtable - value exists
  • ((Key e1) is stored as a Handle of (Key (Triggering unit)) in hash) Equal to True
If it returns true, the effect is already there, so don't recreate it. Maybe you can use that.

Unit takes damage could be better event.
 

Attachments

  • Effect_Apply.w3x
    13.4 KB · Views: 47
Status
Not open for further replies.
Top