• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Making condition about number of alive heroes

Status
Not open for further replies.
Level 11
Joined
Jul 17, 2013
Messages
544
Hi i want to create condition for my event but i dont know how to do that. Since most of u know LOTR let me Describe it excatly. I got 9 fellowship heroes and they gotta pass the bridge of khaza dum. The way to bridge is danger. So i need help to make it so all heroes who are alive need to cross the bridge even if some hero dies meanwhile crossing bridge then it should still trigger the event even if all other heroes passed. And even if a few heroes died eralier than crossing bridge it still should trigger event

In short i need to make condition for all heroes who are alive at currently moment to cross bridge then event should happen.
 
Do this;

  • All Heroes Are Over The Bridge
    • Events
      • Unit - A unit enters Target <gen>
    • Conditions
      • ((Triggering unit) is in HeoresAliveGroup) Equal to True
    • Actions
      • Unit Group - Remove (Picked unit) from HeoresAliveGroup
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (HeoresAliveGroup is empty) Equal to True
        • Then - Actions
          • Game - Victory (Owner of (Triggering unit)) (Show dialogs, Show scores)
        • Else - Actions
Remember to remove heroes who dies from HeoresAliveGroup, and remember to add all living heroes to it when the game starts.
 
Status
Not open for further replies.
Top