• 🏆 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] 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 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