• 🏆 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] Trigger only works properly for Player 1 (Red)

Status
Not open for further replies.

Vunjo

Hosted Project: SC
Level 14
Joined
Jul 1, 2010
Messages
1,340
Hi there.

I've got a problem with a trigger of mine down below. I'm trying to make a trigger that when players "double tap" their Hero, or in other words, select them twice within 0.40 seconds, they become invulnerable for a short duration (They gain a rune that activates Divine Shield spell).

For some reason this only seems to be working properly for Player 1 (Red), and it does not work for any other players. I have provided a picture below that shows the result from perspective of Player 1 (Red), and it works fine. Now I assure you that all default conditions are met, as the trigger does run on its own, but the second part of the trigger does not run for all players.

I'm running on 1.29 patch btw, and I know this patch had some issues with Players and their player numbers, so could this be the cause of the issue, or did I just mess something up in the triggers?

Thanks in advance for help.

  • Dodger Divine Shield
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
    • Conditions
      • ArenaInMatch Equal to True
      • (Trait_TraitsSelected[(Player number of (Triggering player))] has an item of type Dodger) Equal to True
      • (Owner of (Triggering unit)) Equal to (Triggering player)
      • ((Triggering unit) is A Hero) Equal to True
      • ((Triggering unit) has buff Freezing Breath) Equal to False
    • Actions
      • Game - Display to (All players) the text: (Player + ((Name of (Triggering player)) + ( is selecting his Hero + ((Name of (Triggering unit)) + ( |cffffffffwith the remaining time of + ((String((Remaining time for Trait_DodgerTimer2[(Player number of (Triggering player))]))) + ( and the cooldown of
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Remaining time for Trait_DodgerTimer2[(Player number of (Triggering player))]) Greater than 0.00
          • (Remaining time for Trait_DodgerTimer1[(Player number of (Triggering player))]) Equal to 0.00
        • Then - Actions
          • Game - Display to (All players) the text: (Player + ((Name of (Triggering player)) + ( is giving Divine Shield to his Hero + (Name of (Triggering unit)))))
          • Hero - Create Trait_Dodger_Divine Shield and give it to (Triggering unit)
          • Item - Remove (Last created item)
          • Set TempReal = 8.00
          • Set TempReal = (TempReal x (Power(0.96, (Real(STAT_TraitMas_Total[(Player number of (Owner of (Triggering unit)))])))))
          • Countdown Timer - Start Trait_DodgerTimer1[(Player number of (Owner of (Triggering unit)))] as a One-shot timer that will expire in TempReal seconds
          • Unit - Remove Stunned buff from (Triggering unit)
          • Unit - Remove Stunned (Pause) buff from (Triggering unit)
          • Unit - Remove Impale buff from (Triggering unit)
          • Unit - Remove Ensnare (General) buff from (Triggering unit)
          • Unit - Remove Ensnare (Ground) buff from (Triggering unit)
          • Unit - Remove |cffC6E3F5Ring of Frost buff from (Triggering unit)
          • Unit - Remove |cff82cdfcMind Control buff from (Triggering unit)
          • Unit - Remove |cff82cdfcLightning Field MS buff from (Triggering unit)
          • Unit - Remove |cff82cdfcPoison buff from (Triggering unit)
          • Unit - Remove |cff23E829Poisoned buff from (Triggering unit)
          • Unit - Remove |cff82cdfcLightning Field MS buff from (Triggering unit)
          • Unit - Remove |cff82cdfcLightning Field Speed Aura buff from (Triggering unit)
          • Unit - Remove |cff332A8ELunar Hunt buff from (Triggering unit)
          • Unit - Remove |cff332A8EDread buff from (Triggering unit)
          • Unit - Remove |cff1e53c9Earthquake buff from (Triggering unit)
          • Unit - Remove |cff82cdfcStormlord Slow buff from (Triggering unit)
          • Unit - Remove |cffdf1111Hunted buff from (Triggering unit)
          • Unit - Remove |cfff8fcd5Burning buff from (Triggering unit)
          • Unit - Remove |cffC6E3F5Ring of Frost buff from (Triggering unit)
          • Unit - Remove Slow Poison (Info) buff from (Triggering unit)
          • Unit - Remove Slow Poison (Non-stacking) buff from (Triggering unit)
          • Unit - Remove Slow Poison (Stacking) buff from (Triggering unit)
          • Unit - Remove Slowed buff from (Triggering unit)
          • Unit - Remove Slow buff from (Triggering unit)
        • Else - Actions
      • Countdown Timer - Start Trait_DodgerTimer2[(Player number of (Triggering player))] as a One-shot timer that will expire in 0.40 seconds
 

Attachments

  • Dodger.png
    Dodger.png
    739.1 KB · Views: 40

Vunjo

Hosted Project: SC
Level 14
Joined
Jul 1, 2010
Messages
1,340
Oh my God I'm so silly :( Yeah it was the array size, it was set to 1. That's the only variable of this type that I use in the map that had an array of size 1, I guess I just forgot about it.

Thanks for the quick solution. +Rep
 
Status
Not open for further replies.
Top