Triggering Issue

TfauxT

New Member
Reaction score
2
I'm trying to get my hero defence working, but for some reason my spawn triggers arent working correctly. I want players to have ample time destroying invaders and for the enemy to spawn more only if all enemy units are destroyed. My code is the following:



Code:
Game - Display to (All players) for 20.00 seconds the text: |cffffcc00~Phase 2~
Sound - Play GoodJob <gen>
Unit - Create 15 Greater Imp for Player 9 (Gray) at (Center of Spawn top <gen>) facing Default building facing degrees
Unit Group - Add all units of (Last created unit group) to Monsters
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (All units of Monsters are dead) Equal to True
    Then - Actions
        Trigger - Run Start phase 3 <gen> (checking conditions)
    Else - Actions
        Do nothing
 

Exide

I am amazingly focused right now!
Reaction score
448
And what happens is?
-It it not working, I take it.

I'm making maps in RoC, so I just slightly different triggers than you, I reckon.
But what I did was to check for food usage of Player 12 (Brown) - or whatever player it is that you have as Computer player / Attackers.

So that, when Player 12's food usage becomes equal to 0 - run next level.
(Of course, there's a lot more to it. But I'm not at WE now, so I can't post the triggers atm, sorry.)
-But maybe you get the picture :p
 

Mr Zero

Junior Regular (Got the T-shirt)
Reaction score
64
Code:
Game - Display to (All players) for 20.00 seconds the text: |cffffcc00~Phase 2~
Sound - Play GoodJob <gen>
Unit - Create 15 Greater Imp for Player 9 (Gray) at (Center of Spawn top <gen>) facing Default building facing degrees
Unit Group - Add all units of (Last created unit group) to Monsters
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (All units of Monsters are dead) Equal to True
    Then - Actions
        Trigger - Run Start phase 3 <gen> (checking conditions)
    Else - Actions
        Do nothing
One word: Doh!

You check the monsters are dead after you have spawned them.
Not working :D

What you need:

Code:
Check Monsters
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ([B]<Your Unit Group>[/B] is empty) Equal to True
            Then - Actions
                Trigger - Run [B]<Your Trigger[/B] (checking conditions)
            Else - Actions
                Do nothing

Hope it helps :)
 
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