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

[Solved] Not Skipping Problem

Status
Not open for further replies.
Level 5
Joined
Sep 27, 2011
Messages
141
Using the action Skip Remaining actions in my trigger i find that it carries on with the rest of the functions after i used this. And yes the condition is being met as the text is displayed. Can someone tell me what is wrong.
  • Choose Hero
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Choose Hero
    • Actions
      • Set Temp_Player = (Triggering player)
      • Set Player_Number = (Player number of Temp_Player)
      • Set Chosen_Hero[Player_Number] = Hero[Hero_Pick_Number[Player_Number]]
      • Set Heroes = (Units in Healing Area <gen> matching (((Matching unit) is A Hero) Equal to True))
      • Set Single_Player = (All players matching (Temp_Player Equal to (Matching player)))
      • Unit Group - Pick every unit in Heroes and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Chosen_Hero[Player_Number]
            • Then - Actions
              • Game - Display to Single_Player the text: This hero has alrea...
              • Custom script: call DestroyGroup(udg_Heroes)
              • Custom script: call DestroyForce(udg_Single_Player)
              • Skip remaining actions
            • Else - Actions
      • Countdown Timer - Start Confirm_Timer[Player_Number] as a One-shot timer that will expire in 5.00 seconds
      • Unit - Add Confirm to (Triggering unit)
      • Custom script: call DestroyGroup(udg_Heroes)
      • Custom script: call DestroyForce(udg_Single_Player)
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Yes, but it's cheap enough that ForGroup (this method) was claimed to be faster than a FirstOfGroup-remove-loop:

JASS:
loop
    set u = FirstOfGroup(g)

    exitwhen (u == null)

    call GroupRemoveUnit(g)

    //do Actions with u
endloop

which does not open a new thread. Might not be comparable to trigger threads and the like.
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
Yes, but it's cheap enough that ForGroup (this method) was claimed to be faster than a FirstOfGroup-remove-loop:

JASS:
loop
    set u = FirstOfGroup(g)

    exitwhen (u == null)

    call GroupRemoveUnit(g)

    //do Actions with u
endloop
which does not open a new thread. Might not be comparable to trigger threads and the like.

Yes I know about FirstOfGroup but I never know that fact until you mentioned that, thanks. I assume that WC3 creates thread for every destructible, isn't it ?
 
Level 3
Joined
May 12, 2012
Messages
59
may have solved the problem but have you considered moving the remaining triggers that need to be skipped to an if then else multiple function trigger where else is your trigger and if conditions met you stop there? i did that with a spawn unit when attacked trigger to make sure 5 units didnt spawn cause it was attacked 4 additional times
 
Status
Not open for further replies.
Top