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

[Trigger] What's Wrong?

Status
Not open for further replies.
Level 7
Joined
Mar 6, 2014
Messages
203
[Hide=Infinite Discharge]
  • ID
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Infinite Discharge
    • Actions
      • Set Index = (Index + 1)
      • Set Caster[Index] = (Triggering unit)
      • Set Target[Index] = (Target unit of ability being cast)
      • Set TargetLoc[Index] = (Position of Target[Index])
      • Set Duration = 7
      • Unit - Pause Caster[Index]
      • Unit - Pause Target[Index]
      • Unit - Move Caster[Index] instantly to TargetLoc[Index], facing TargetLoc[Index]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Index Equal to 1
        • Then - Actions
          • Trigger - Turn on ID Loop <gen>
        • Else - Actions
[/Hide]

[Hide=Infinite Discharge Loop]
  • ID Loop
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Integer) from 1 to Index, do (Actions)
        • Loop - Actions
          • Animation - Change Caster[Integer]'s animation speed to 200.00% of its original speed
          • Animation - Change Caster[Integer]'s vertex coloring to ((100.00 - 10.00)%, 100.00%, 100.00%) with 0.00% transparency
          • Animation - Play Caster[Integer]'s attack animation
          • Unit - Cause Caster[Integer] to damage Target[Integer], dealing 50.00 damage of attack type Spells and damage type Normal
          • Set Duration = (Duration - 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Duration Equal to 0
            • Then - Actions
              • Trigger - Turn off (This trigger)
              • Set Caster[Integer] = Caster[Index]
              • Set Target[Integer] = Target[Index]
              • Unit - Unpause Caster[Integer]
              • Unit - Unpause Target[Integer]
            • Else - Actions
[/Hide]

whats wrong with my trigger? if i cast it twice the 1st caster will pause and when i cast it again it doesn't work now....

can you help me with this?
+rep for those who help
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Because your Duration variable must also be a array variable.

Also there are some minor mistakes, you are decreasing duration by 1.00 but every 0.50 seconds etc...

Omg I should check Purgeandfire's guide.

Yeah I think this is how you should do it, thanks to him.
http://www.hiveworkshop.com/forums/...orials-279/visualize-dynamic-indexing-241896/

  • ID
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Infinite Discharge
    • Actions
      • Set Index = (Index + 1)
      • Set Caster[Index] = (Triggering unit)
      • Set Target[Index] = (Target unit of ability being cast)
      • Set TargetLoc[Index] = (Position of Target[Index])
      • Set Duration[Index] = 7
      • Unit - Pause Caster[Index]
      • Unit - Pause Target[Index]
      • Unit - Move Caster[Index] instantly to TargetLoc[Index], facing TargetLoc[Index]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Index Equal to 1
        • Then - Actions
          • Trigger - Turn on ID Loop <gen>
        • Else - Actions
  • ID Loop
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Integer) from 1 to Index, do (Actions)
        • Loop - Actions
          • Animation - Change Caster[Integer]'s animation speed to 200.00% of its original speed
          • Animation - Change Caster[Integer]'s vertex coloring to ((100.00 - 10.00)%, 100.00%, 100.00%) with 0.00% transparency
          • Animation - Play Caster[Integer]'s attack animation
          • Unit - Cause Caster[Integer] to damage Target[Integer], dealing 50.00 damage of attack type Spells and damage type Normal
          • Set Duration[Integer] = (Duration[Integer] - 0.50)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Duration[Integer] less than or equal to 0
            • Then - Actions
              • Unit - Unpause Caster[Integer]
              • Unit - Unpause Target[Integer]
              • Set Caster[Integer] = Caster[Index]
              • Set Target[Integer] = Target[Index]
              • Set Duration[Integer] = Duration[Index]
              • Set Index = (Index - 1)
              • Set Integer = (Integer - 1)
            • Else - Actions
Also that Unit - Move action at spell start effect trigger breaks spell's cooldown or manacost I think?
 
Level 13
Joined
Jul 16, 2012
Messages
679
I suggest you to reconstruct again your Trigger Loop

If you use Duration. You must use 0.03 seconds means this is a MiniSeconds that use in Timer or Duration.

You need Add Condition before use Action.

This is your Spell that i reconstructed

  • Untitled Trigger 001
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer X) from 1 to Y, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Duration[X] Less than or equal to 0.00
            • Then - Actions
              • -------- Some Real Vars --------
              • Set Color[X] = (Color[X] - 10.00)
              • Set Duration[X] = (Duration[X] - 0.03)
              • -------- Do Action --------
              • Animation - Change Unit[X]'s animation speed to 200.00% of its original speed
              • Animation - Change Unit[X]'s vertex coloring to (Color[X]%, 100.00%, 100.00%) with 0.00% transparency
              • Animation - Play Unit[X]'s attack animation
              • Unit - Cause Unit[X] to damage Target[X], dealing 50.00 damage of attack type Spells and damage type Normal
            • Else - Actions
              • Set X = (X - 1)
              • Set Y = (Y - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Y Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                  • Skip remaining actions
                • Else - Actions
 
Level 7
Joined
Mar 6, 2014
Messages
203
I suggest you to reconstruct again your Trigger Loop

If you use Duration. You must use 0.03 seconds means this is a MiniSeconds that use in Timer or Duration.

You need Add Condition before use Action.

This is your Spell that i reconstructed

  • Untitled Trigger 001
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer X) from 1 to Y, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Duration[X] Less than or equal to 0.00
            • Then - Actions
              • -------- Some Real Vars --------
              • Set Color[X] = (Color[X] - 10.00)
              • Set Duration[X] = (Duration[X] - 0.03)
              • -------- Do Action --------
              • Animation - Change Unit[X]'s animation speed to 200.00% of its original speed
              • Animation - Change Unit[X]'s vertex coloring to (Color[X]%, 100.00%, 100.00%) with 0.00% transparency
              • Animation - Play Unit[X]'s attack animation
              • Unit - Cause Unit[X] to damage Target[X], dealing 50.00 damage of attack type Spells and damage type Normal
            • Else - Actions
              • Set X = (X - 1)
              • Set Y = (Y - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Y Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                  • Skip remaining actions
                • Else - Actions
thx it helps a lot
 
Status
Not open for further replies.
Top