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

Am I missing here something? (triggers not working as they should)

Status
Not open for further replies.
Level 4
Joined
Jul 20, 2012
Messages
83
Well hello there again, I've been working on something rather big lately and I've got everything set just fine until the boss appears and he has like 23k+ HP or so...
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • Game_Mode_Siege_Stage Equal to 7
          • Game_Mode_Siege_Stage Equal to 23
          • Game_Mode_Siege_Stage Equal to 32
          • Game_Mode_Siege_Stage Equal to 36
          • Game_Mode_Siege_Stage Equal to 45
          • Game_Mode_Siege_Stage Equal to 59
          • Game_Mode_Siege_Stage Equal to 69
          • Game_Mode_Siege_Stage Equal to 81
          • Game_Mode_Siege_Stage Equal to 92
          • Game_Mode_Siege_Stage Equal to 101
    • Then - Actions
      • Unit - Order Barracks 0059 <gen> to research Increases every 10 minutes of game time
      • Set Game_Mode_Siege_UnitsLeft = (Real(Game_NumberOfPlayers))
      • Unit - Create (Integer(Game_Mode_Siege_UnitsLeft)) Game_Mode_Siege_StageUnit[Game_Mode_Siege_Stage] for Neutral Hostile at (Center of SiegeModeBossSpawn <gen>) facing (Position of Barracks 0059 <gen>)
      • Trigger - Turn off Trees Revival <gen>
      • Destructible - Pick every destructible in SiegeModeBossSpawn <gen> and do (Destructible - Kill (Picked destructible))
      • For each (Integer A) from 1 to Game_NumberOfPlayers, do (Actions)
        • Loop - Actions
          • If (Game_Mode_Siege_Stage Equal to 7) then do (Unit - Replace (Last created unit) with a Game_Mode_Siege_StageUnit[(Random integer number between 1 and 6)] using The new unit's max life and mana) else do (Do nothing)
          • If (Game_Mode_Siege_Stage Equal to 23) then do (Unit - Replace (Last created unit) with a Game_Mode_Siege_StageUnit[(Random integer number between 8 and 22)] using The new unit's max life and mana) else do (Do nothing)
          • If (Game_Mode_Siege_Stage Equal to 32) then do (Unit - Replace (Last created unit) with a Game_Mode_Siege_StageUnit[(Random integer number between 24 and 31)] using The new unit's max life and mana) else do (Do nothing)
          • If (Game_Mode_Siege_Stage Equal to 36) then do (Unit - Replace (Last created unit) with a Game_Mode_Siege_StageUnit[(Random integer number between 33 and 35)] using The new unit's max life and mana) else do (Do nothing)
          • If (Game_Mode_Siege_Stage Equal to 45) then do (Unit - Replace (Last created unit) with a Game_Mode_Siege_StageUnit[(Random integer number between 37 and 44)] using The new unit's max life and mana) else do (Do nothing)
          • If (Game_Mode_Siege_Stage Equal to 59) then do (Unit - Replace (Last created unit) with a Game_Mode_Siege_StageUnit[(Random integer number between 46 and 58)] using The new unit's max life and mana) else do (Do nothing)
          • If (Game_Mode_Siege_Stage Equal to 69) then do (Unit - Replace (Last created unit) with a Game_Mode_Siege_StageUnit[(Random integer number between 60 and 68)] using The new unit's max life and mana) else do (Do nothing)
          • If (Game_Mode_Siege_Stage Equal to 81) then do (Unit - Replace (Last created unit) with a Game_Mode_Siege_StageUnit[(Random integer number between 70 and 80)] using The new unit's max life and mana) else do (Do nothing)
          • If (Game_Mode_Siege_Stage Equal to 92) then do (Unit - Replace (Last created unit) with a Game_Mode_Siege_StageUnit[(Random integer number between 82 and 91)] using The new unit's max life and mana) else do (Do nothing)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Game_Mode_Siege_Stage Not equal to 101
        • Then - Actions
          • Unit Group - Pick every unit in (Units owned by Neutral Hostile) and do (Actions)
            • Loop - Actions
              • Unit Group - Pick every unit in (Units owned by Neutral Hostile) and do (Actions)
                • Loop - Actions
                  • Unit - Add Inventory (Hero) to (Picked unit)
                  • For each (Integer A) from 1 to (Level of (Picked unit)), do (Actions)
                    • Loop - Actions
                      • Hero - Create Siege Mode Boss Health and give it to (Picked unit)
                  • Animation - Change (Picked unit)'s vertex coloring to ((Random percentage)%, (Random percentage)%, (Random percentage)%) with 0.00% transparency
                  • Animation - Change (Picked unit)'s size to (150.00%, 150.00%, 150.00%) of its original size
                  • Unit - Add classification of A sapper to (Picked unit)
                  • Unit - Add Damage (Boss Unit) to (Picked unit)
                  • Unit - Set level of Damage (Boss Unit) for (Picked unit) to (Level of (Picked unit))
                  • Unit - Add Game_Boss_Ability[(Random integer number between 1 and 8)] to (Picked unit)
                  • Unit - Remove Inventory (Hero) from (Picked unit)
          • Trigger - Run Boss Abilities <gen> (checking conditions)
        • Else - Actions
          • Set Game_Mode_Siege_UnitsLeft = 1.00
          • Unit Group - Pick every unit in (Units owned by Neutral Hostile of type Siege Mode Boss Unit) and do (Unit - Remove (Picked unit) from the game)
          • Unit - Create 1 Forgotten One for Neutral Hostile at (Center of SiegeModeFinalBoss <gen>) facing Default building facing degrees
          • Set Game_Mode_Siege_FinalStage = (Last created unit)
          • Unit - Add Inventory (Hero) to Game_Mode_Siege_FinalStage
          • For each (Integer A) from 1 to (15 x Game_NumberOfPlayers), do (Actions)
            • Loop - Actions
              • Hero - Create Siege Mode Boss Health and give it to Game_Mode_Siege_FinalStage
          • Unit - Add Damage (Boss Unit) to Game_Mode_Siege_FinalStage
          • Unit - Set level of Damage (Boss Unit) for Game_Mode_Siege_FinalStage to (Level of Game_Mode_Siege_FinalStage)
          • Unit - Add classification of A sapper to Game_Mode_Siege_FinalStage
          • Unit - Remove Inventory (Hero) from Game_Mode_Siege_FinalStage
          • Animation - Play Game_Mode_Siege_FinalStage's birth animation
          • Trigger - Run Final Boss <gen> (checking conditions)
      • Item - Pick every item in (Entire map) and do (Actions)
        • Loop - Actions
          • If ((Item-type of (Picked item)) Equal to Siege Mode Boss Health) then do (Item - Remove (Picked item)) else do (Do nothing)
      • Game - Display to (All players) the text: ((Boss Stage |cffffcc00 + (String(Game_Mode_Siege_Stage))) + |r has begun!)
    • Else - Actions
      • Set Game_Mode_Siege_UnitsLeft = (Real((10 + (10 x Game_NumberOfPlayers))))
      • Unit - Create ((Integer(Game_Mode_Siege_UnitsLeft)) / 2) Game_Mode_Siege_StageUnit[Game_Mode_Siege_Stage] for Neutral Hostile at (Center of SiegeModeSpawn1 <gen>) facing (Position of Barracks 0059 <gen>)
      • Unit - Create ((Integer(Game_Mode_Siege_UnitsLeft)) / 2) Game_Mode_Siege_StageUnit[Game_Mode_Siege_Stage] for Neutral Hostile at (Center of SiegeModeSpawn2 <gen>) facing (Position of Barracks 0059 <gen>)
      • Game - Display to (All players) the text: ((Stage |cffffcc00 + (String(Game_Mode_Siege_Stage))) + (|r has begun spawning |cffffcc00 + ((Name of (Last created unit)) + s|r, kill them all!)))
  • Unit Group - Pick every unit in (Units owned by Neutral Hostile) and do (Actions)
    • Loop - Actions
      • Unit Group - Pick every unit in (Units owned by Neutral Hostile) and do (Actions)
        • Loop - Actions
          • Unit - Add Inventory (Hero) to (Picked unit)
          • For each (Integer A) from 1 to (Level of (Picked unit)), do (Actions)
            • Loop - Actions
              • Hero - Create Siege Mode Boss Health and give it to (Picked unit)
- this part bothers me the most (Siege Mode Boss Health is a Tome of Health with 1000 HP bonus or whatever it is called)
- no matter what it just won't give 1-10 times this book but much more
- is there a problem with Conditions?
 
Level 4
Joined
May 25, 2009
Messages
100
How many Units are owned by Neutral Hostile and do you want two Unit-Picks?
Because as i think, the first loops starts and picks the First Unit. For this first unit the second pick starts and for this picked unit the items are added, based on the level.
Then the second loops stops, after all picked units from the second loop got their items.

After that the first Loop picks the second unit und that for this unit the second loops starts again and the units gets the items again...
so basicly all the units get the tome Level of Picked Unit * Number of Units owned by neutral hostile.


But maybe u just did a mistake by pasting it in hive...if so ignore my post ;D

EDIT: It took to much time to write my post xD
 
Level 4
Joined
Jul 20, 2012
Messages
83
There's no problem with two separate loops as far as I know, I never had a problem with them since all functions inside them are related to Picked Units for the particular loop only but "For each integer A from 1 to Level of Picked Unit" doesn't seem to work for me, units recieve the Tome of Health only once like the Integer number doesn't work for integer A, should I use "For each integer Variable from 1 to x" function?
Also I tried
Unit Group - Pick every unit in (Units owned by Neutral Hostile) and do (Actions)
Loop - Actions
Unit - Add Inventory (Hero) to (Picked unit)
For each (Integer A) from 1 to (Level of (Picked unit)), do (Actions)
Loop - Actions
Hero - Create Siege Mode Boss Health and give it to (Picked unit)
in blank editor map and it worked flawlessly, don't know where the problem is :(
 
Status
Not open for further replies.
Top