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

[Trigger] Little Help

Status
Not open for further replies.
Level 17
Joined
Jun 12, 2007
Messages
1,261
Oke, I have a lot of triggers, but I filtered my problem out.
Basically I have this part of the initialization trigger:

  • For each (Integer A) from 1 to 8, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Player((Integer A))) slot status) Equal to Is playing
        • Then - Actions
          • Player Group - Add (Player((Integer A))) to PlayersActiveGroup
          • Set PlayersAlive = (PlayersAlive + 1)
        • Else - Actions
Now this sets the amount of players that are alive.

---
Each player that is alive, will get a 'wisp' that can train a hero.
But they only have 90 seconds to select a hero (timer for it).
Now after 90 seconds these 'wisps' get removed, but I need to reduce PlayersAlive by 1 for each 'wisp' getting removed.
---

This is what I made so far:

  • Prepare Timer Ends
    • Events
      • Time - PrepareTimer expires
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units of type Hero Selector) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
I know I have to use:

  • Set PlayersAlive = (PlayersAlive - 1)
But how/where should I put that action in my second trigger?
It's just a easy question cause I forgot this... xD
Or I drank to much, anyway... helper gains rep.
 
Status
Not open for further replies.
Top