Trigger Problem!

remix

New Member
Reaction score
9
Hi guys,

I have a problem with one of my triggers, here it is:

Code:
Turn on round1 end
    Events
        Unit - A unit Dies
    Conditions
        And - All (Conditions) are true
            Conditions
                (Unit-type of (Dying unit)) Equal to  of 1
    Actions
        Set AliveChickens = (AliveChickens - 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                AliveChickens Equal to 0
            Then - Actions
                Trigger - Run Turn on Round1 end <gen> (checking conditions)
                Wait 0.50 seconds
                Trigger - Turn off (This trigger)
            Else - Actions

Can anybody spot a problem here??

Then it turns This trigger on:

Code:
Turn on Round1 end
    Events
    Conditions
        And - All (Conditions) are true
            Conditions
                (Number of units in (Units of type  of 1)) Equal to 0
    Actions
        Wait 1.00 seconds
        Trigger - Turn on Round1 end <gen>
        Game - Display to (All players) the text: Round |cffffcc001|r...
        Trigger - Turn on lose <gen>
        Wait 1.00 seconds

Then it turns this trigger on:

Code:
Round1 end
    Events
    Conditions
    Actions
        Trigger - Turn off (This trigger)
        Trigger - Turn off lose <gen>
        Trigger - Turn off spawn 1 <gen>
        Trigger - Turn off spawn 2 <gen>
        Trigger - Turn off spawn 3 <gen>
        Trigger - Turn off spawn 4 <gen>
        Trigger - Turn off spawn 5 <gen>
        Trigger - Turn off spawn 6 <gen>
        Trigger - Turn off spawn 7 <gen>
        Trigger - Turn off spawn 8 <gen>
        Wait 3.65 seconds
        -------- Game Starts --------
        Wait 5.00 seconds
        Game - Display to (All players) the text: |c0020C000Round 2 s...
        Wait 0.65 seconds
        Game - Display to (All players) the text: |c00FF00003...
        Sound - Play GameBegins <gen>
        Wait 1.00 seconds
        Game - Display to (All players) the text: |c000000802...
        Sound - Play GameBegins <gen>
        Wait 1.00 seconds
        Game - Display to (All players) the text: |c0030C0001...
        Sound - Play GameBegins <gen>
        Wait 1.00 seconds
        Game - Display to (All players) the text: |c00FFFC01Round 2 h...
        -------- Set Variables --------
        Set Round = (Round + 1)
        Set Hero_Levels[1] = 14
        Set Hero_Levels[2] = 14
        Set Hero_Levels[3] = 14
        Set Hero_Levels[4] = 14
        Set Hero_Levels[5] = 14
        Set Hero_Levels[6] = 14
        Set Hero_Levels[7] = 14
        Set Hero_Levels[8] = 14
        Set Hero_Stats[1] = Alive
        Set Hero_Stats[2] = Alive
        Set Hero_Stats[3] = Alive
        Set Hero_Stats[4] = Alive
        Set Hero_Stats[5] = Alive
        Set Hero_Stats[6] = Alive
        Set Hero_Stats[8] = Alive
        If ((Player 1 (Red) slot status) Equal to Is playing) then do (Unit - Create 1  of 1 for Player 1 (Red) at (Center of player 1 chicken <gen>) facing Default building facing degrees) else do (Do nothing)
        Set Chicken_Players[1] = (Last created unit)
        Set Hero_Levels[1] = 14
        Selection - Select (Last created unit) for Player 1 (Red)
        Hero - Set (Last created unit) Hero-level to 14, Hide level-up graphics
        If ((Player 2 (Blue) slot status) Equal to Is playing) then do (Unit - Create 1  of 1 for Player 2 (Blue) at (Center of player 2 chicken <gen>) facing Default building facing degrees) else do (Do nothing)
        Set Chicken_Players[2] = (Last created unit)
        Selection - Select (Last created unit) for Player 2 (Blue)
        Hero - Set (Last created unit) Hero-level to 14, Hide level-up graphics
        If ((Player 3 (Teal) slot status) Equal to Is playing) then do (Unit - Create 1  of 1 for Player 3 (Teal) at (Center of player 3 chicken <gen>) facing Default building facing degrees) else do (Do nothing)
        Set Chicken_Players[3] = (Last created unit)
        Selection - Select (Last created unit) for Player 3 (Teal)
        Hero - Set (Last created unit) Hero-level to 14, Hide level-up graphics
        If ((Player 4 (Purple) slot status) Equal to Is playing) then do (Unit - Create 1  of 1 for Player 4 (Purple) at (Center of player 4 chicken <gen>) facing Default building facing degrees) else do (Do nothing)
        Set Chicken_Players[4] = (Last created unit)
        Selection - Select (Last created unit) for Player 4 (Purple)
        Hero - Set (Last created unit) Hero-level to 14, Hide level-up graphics
        If ((Player 5 (Yellow) slot status) Equal to Is playing) then do (Unit - Create 1  of 1 for Player 5 (Yellow) at (Center of player 5 chicken <gen>) facing Default building facing degrees) else do (Do nothing)
        Set Chicken_Players[5] = (Last created unit)
        Selection - Select (Last created unit) for Player 5 (Yellow)
        Hero - Set (Last created unit) Hero-level to 14, Hide level-up graphics
        If ((Player 6 (Orange) slot status) Equal to Is playing) then do (Unit - Create 1  of 1 for Player 6 (Orange) at (Center of player 6 chicken <gen>) facing Default building facing degrees) else do (Do nothing)
        Set Chicken_Players[6] = (Last created unit)
        Selection - Select (Last created unit) for Player 6 (Orange)
        Hero - Set (Last created unit) Hero-level to 14, Hide level-up graphics
        If ((Player 7 (Green) slot status) Equal to Is playing) then do (Unit - Create 1  of 1 for Player 7 (Green) at (Center of player 7 chicken <gen>) facing Default building facing degrees) else do (Do nothing)
        Set Chicken_Players[7] = (Last created unit)
        Selection - Select (Last created unit) for Player 7 (Green)
        Hero - Set (Last created unit) Hero-level to 14, Hide level-up graphics
        If ((Player 8 (Pink) slot status) Equal to Is playing) then do (Unit - Create 1  of 1 for Player 8 (Pink) at (Center of player 8 chicken <gen>) facing Default building facing degrees) else do (Do nothing)
        Set Chicken_Players[8] = (Last created unit)
        Selection - Select (Last created unit) for Player 8 (Pink)
        Hero - Set (Last created unit) Hero-level to 14, Hide level-up graphics
        Trigger - Turn on lose <gen>


Can eny body find a prblem?? I am desperate. Thanx
 

U are a noob

Mega Super Ultra Cool Member
Reaction score
152
Code:
                (Unit-type of (Dying unit)) Equal to  of 1
                (Number of units in (Units of type  of 1)) Equal to 0
What is equal to?
I don't see another unit type.
 

PiCkstix

New Member
Reaction score
18
"of 1" is his unit... eg. if it is Level 3 his name will be "Level 3 of 1"...

I don't know how I know this...
 

remix

New Member
Reaction score
9
... download the map and you see what i mean + the map is called Dodge The Rolling Barrels so there will be another unit "The Barrels".

Download Dodge The Rolling Barrels:
 

Attachments

  • Dodge The Rolling Barrels v1.00.w3x
    64.1 KB · Views: 126
T

The Mapmaker

Guest
>Set AliveChickens = (AliveChickens - 1)

First of all, you have to set AliveChickens to a real variable first. Then you can subract.

Code:
Set AliveChickens = (Number of units in Region)

Then:

Code:
Set AliveChickens = (AliveChickens - 1)

Hope this works.

(By the way, Set AliveChickens = (Number of units in Region) might not be an actual action.)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top