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

Can't get this to work

Status
Not open for further replies.
Level 6
Joined
Sep 27, 2008
Messages
258
idk why but this isn't working

  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Camera - Set (Picked player)'s camera Distance to target to 3000.00 over 0.00 seconds
      • Visibility - Disable fog of war
      • Visibility - Disable black mask
      • Destructible - Make Elven Gate (Vertical) 0000 <gen> Invulnerable
      • Destructible - Make Elven Gate (Vertical) 0001 <gen> Invulnerable
      • Destructible - Make Elven Gate (Vertical) 0002 <gen> Invulnerable
      • Destructible - Make Elven Gate (Vertical) 0003 <gen> Invulnerable
      • Hashtable - Create a hashtable
      • Set HashTable = (Last created hashtable)
  • Power up
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Power Up to the Very Limit
    • Actions
      • Hashtable - Save Handle Of(Triggering unit) as 0 of 0 in HashTable
      • Trigger - Turn on Power up loop effect <gen>
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of (Ability being cast) for (Triggering unit)) Equal to 1
        • Then - Actions
          • Hero - Modify Strength of (Triggering unit): Add 20
          • Hero - Modify Agility of (Triggering unit): Add 20
          • Hero - Modify Intelligence of (Triggering unit): Add 20
          • Wait 10.00 game-time seconds
          • Hero - Modify Strength of (Triggering unit): Subtract 20
          • Hero - Modify Agility of (Triggering unit): Subtract 20
          • Hero - Modify Intelligence of (Triggering unit): Subtract 20
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of (Ability being cast) for (Triggering unit)) Equal to 2
        • Then - Actions
          • Hero - Modify Strength of (Triggering unit): Add 40
          • Hero - Modify Agility of (Triggering unit): Add 40
          • Hero - Modify Intelligence of (Triggering unit): Add 40
          • Wait 10.00 game-time seconds
          • Hero - Modify Strength of (Triggering unit): Subtract 40
          • Hero - Modify Agility of (Triggering unit): Subtract 40
          • Hero - Modify Intelligence of (Triggering unit): Subtract 40
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of (Ability being cast) for (Triggering unit)) Equal to 3
        • Then - Actions
          • Hero - Modify Strength of (Triggering unit): Add 60
          • Hero - Modify Agility of (Triggering unit): Add 60
          • Hero - Modify Intelligence of (Triggering unit): Add 60
          • Wait 10.00 game-time seconds
          • Hero - Modify Strength of (Triggering unit): Subtract 60
          • Hero - Modify Agility of (Triggering unit): Subtract 60
          • Hero - Modify Intelligence of (Triggering unit): Subtract 60
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of (Ability being cast) for (Triggering unit)) Equal to 4
        • Then - Actions
          • Hero - Modify Strength of (Triggering unit): Add 80
          • Hero - Modify Agility of (Triggering unit): Add 80
          • Hero - Modify Intelligence of (Triggering unit): Add 80
          • Wait 10.00 game-time seconds
          • Hero - Modify Strength of (Triggering unit): Subtract 80
          • Hero - Modify Intelligence of (Triggering unit): Subtract 80
          • Hero - Modify Intelligence of (Triggering unit): Subtract 80
        • Else - Actions
      • Trigger - Turn off Power up loop effect <gen>
  • Power up loop effect
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Create 1 Energy_Dummy for (Load 0 of 0 in HashTable) at (Position of (Triggering unit)) facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
 
Why do you turn on look trigger and immidiately after turn it off?
Dont spam if/then/else if it is not needed.
  • Set integer_variable = (Level of (Ability being cast) for (Triggering unit)
    • If - Conditions
      • Intege_variable greater than 0
    • Then - Actions
      • Hero - Modify Strength of (Triggering unit): Add (20 x Integer_variable)
      • Hero - Modify Agility of (Triggering unit): Add (20 x Integer_variable)
      • Hero - Modify Intelligence of (Triggering unit): Add (20 x Integer_variable)
      • Wait 10.00 game-time seconds
      • Hero - Modify Strength of (Triggering unit): Subtract (20 x Integer_variable)
      • Hero - Modify Agility of (Triggering unit): Subtract (20 x Integer_variable)
      • Hero - Modify Intelligence of (Triggering unit): Subtract (20 x Integer_variable)
    • Else - Actions
EDIT: Yout first trigger leaks playerforce, and your last leaks location.
Instead of (All players) use Set playerforce_variable = (All players)
And after using variable in your action, call custom script: Custom script: call DestroyForce (udg_playerforce_variable)
Similar situation happens with location. Instead of position of given unit use variavle set up, Set point_variable = (Position of (yourunit)
after making use of it call RemoveLocation(udg_point_variable).

By the way, dummy unit won't be created, Position of (Triggering unit) won't be proper responce on time event.
Save position handle or unit handle via hashtable. If you pick unit, refer to its position with variable followed by clearing point leak after creating dummy.
 
Level 6
Joined
Sep 27, 2008
Messages
258
the stats worked it is just the effect didn't
i turn it on at the start of the spell
then every 2 sec it should make an effect till
it is turned off after the 10 sec wait

and thanks for showing me how to make the alot easier
 
Could you tell me hat is the dummy for? Is it for special effect or does it have any other function?

  • spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Set Caster = (Triggering unit)
      • Set AbilityLevel = (Level of (Ability being cast) for Caster)
      • Set Player = (Owner of Caster)
      • Set AtributeBonus = 20
      • Set BonusCalculation = (AtributeBonus x AbilityLevel)
      • -------- ---------- --------
      • Hero - Modify Strength of Caster: Add BonusCalculation
      • Hero - Modify Agility of Caster: Add BonusCalculation
      • Hero - Modify Intelligence of Caster: Add BonusCalculation
      • -------- ---------- --------
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Set Location = (Position of Caster)
          • Unit - Create 1 Footman for Player at Location facing Default building facing degrees
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_Location)
          • Wait 2.00 seconds
      • Hero - Modify Strength of Caster: Subtract BonusCalculation
      • Hero - Modify Agility of Caster: Subtract BonusCalculation
      • Hero - Modify Intelligence of Caster: Subtract BonusCalculation
This is your trigger, works the same as yours, it is still not mui, but it doesn't leak, and it should work faster. And it should work.
 
Status
Not open for further replies.
Top