Why is this trigger not working?

romanandre

New Member
Reaction score
2
Can someone explain to me why it won't work?

Trigger:
  • Wave 2 A
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Dying unit)) Equal to Player 12 (Brown)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units in (Playable map area) owned by Player 12 (Brown))) Equal to 0
        • Then - Actions
          • Trigger - Run Wave 2 B <gen> (ignoring conditions)
        • Else - Actions
          • Do nothing


Trigger:
  • Wave 2 B
    • Events
    • Conditions
    • Actions
      • Player - Set Player 1 (Red) Current gold to 750
      • Countdown Timer - Create a timer window for Timer with title Level two in:
      • Set TimerWindow = (Last created timer window)
      • Countdown Timer - Show TimerWindow
      • Countdown Timer - Start Timer as a One-shot timer that will expire in 10.00 seconds
 

Laiev

Hey Listen!!
Reaction score
188
Trigger:
  • Wave 2 B
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • (Number of units in (Units in (Playable map area) owned by Player 12 (Brown))) Equal to 0
    • Actions
      • Player Group - Pick every player in (players) and do actions
        • Player - Add 750 gold to (Picked player)
      • Countdown Timer - Create a timer window for Timer with title Level two in:
      • Set TimerWindow = (Last created timer window)
      • Countdown Timer - Show TimerWindow
      • Countdown Timer - Start Timer as a One-shot timer that will expire in 10.00 seconds

Set gold change your current gold, this will just add to your current
I don't know how countdown timer work.. but you can change the player group in a variable to make it more explained..
You can do all in one trigger...

Freehand, sorry :(
 

romanandre

New Member
Reaction score
2
I can't make it "Every 1.00 seconds of game time" because the trigger has to go off only after the first wave is down (Tower defense). If I do that it will spam the trigger before level 1 even starts.
 

Laiev

Hey Listen!!
Reaction score
188
I can't make it "Every 1.00 seconds of game time" because the trigger has to go off only after the first wave is down (Tower defense). If I do that it will spam the trigger before level 1 even starts.

No, this trigger will check if has unit in map owned by neutral, if not then will run the trigger, also, you can use other trigger to turn on/off this trigger, the important think is make it work

At the start of this trigger, you can "turn off this trigger" also you turn on when other lane start
 

romanandre

New Member
Reaction score
2
I tried this:
Trigger:
  • Wave 2 A
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • (Number of units in (Units in (Playable map area) owned by Player 12 (Brown))) Equal to 0
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Level Equal to 1
        • Then - Actions
          • Trigger - Run Wave 2 B <gen> (ignoring conditions)
        • Else - Actions
          • Do nothing


but it didnt work... D:

"Level" is an integer variable, does that work?
 

Laiev

Hey Listen!!
Reaction score
188
First, remove all DO NOTHING cuz this line trigger DO NOTHING -.- so you can leave in blank...

Also you set Level equal to 1 in a variable when the first lane end?
 

Laiev

Hey Listen!!
Reaction score
188
don't work?

at least the second trigger run? i mean, you get gold?
 

Laiev

Hey Listen!!
Reaction score
188
delete the second trigger, and in the first trigger, after checked if level equal to 1, in THEN add ALL actions from another trigger to this...

and test

i mean like this:

actions:
if
level equal to 1
then
add 600 gold
create timer
bla bla bla
 

romanandre

New Member
Reaction score
2
Didn't work, it's something in the condition I think... But the only "unit" that could be left for brown is the starting location, without any townhall or workers...
 

Laiev

Hey Listen!!
Reaction score
188
why used brow? lol

hmmm

set instead of "equal to 0" put less then or equal to 0 :S

probably make no change lol but just to check...

Also you can add ALL units spawned by the trigger (the lane which create the units) to a group, and change conditions when group have no unit, do action, is the same but not checking map, just checking the group

and HAVE some brow unit in your map lol, you can test it removing the condition and test without cond :D

i'll wash me :D

brb, try what i say
 

romanandre

New Member
Reaction score
2
I'm using brown as the enemy, thats why. ;p

I know whats wrong now. The trigger is only activating once, I tried this
Trigger:
  • Wave 2 A
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
      • (Number of units in (Units in (Playable map area) owned by Player 12 (Brown))) Less than or equal to 0
    • Actions
      • Player - Set Player 1 (Red) Current gold to 750
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Level Equal to 1
        • Then - Actions
          • Player - Set Player 1 (Red) Current gold to 750
        • Else - Actions
          • Do nothing


and it only gave me gold once, I don't know why its only running once though... when the map starts it goes and then it stops...
 

Laiev

Hey Listen!!
Reaction score
188
back :)
probably one trigger create a unit (dummy or invisible) and you don't know when map start

REMOVE THAT DO NOTHING LOL

and change set to add (gold)
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
It must've some problems with your level adding then.

Trigger:
  • td
    • Events
      • Unit - A unit Dies
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Triggering unit) belongs to an enemy of Player 1 (Red)) Equal to True
          • (Number of units in (Units in (Playable map area) owned by Player 12 (Brown))) Equal to 0
    • Actions
      • Player - Add 1000 to Player 1 (Red) Current gold
      • Countdown Timer - Start timer as a One-shot timer that will expire in 30.00 seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title Title
      • Set timerWindow = (Last created timer window)
      • Countdown Timer - Hide timerWindow
      • -------- Change whatever you want here --------
      • Countdown Timer - Show timerWindow
      • Wait 30.00 seconds
      • Countdown Timer - Destroy timerWindow


Make sure the creep is Brown. Make sure Brown is an enemy of Red. Change 1k gold to whatever you want. Change the 30 seconds for the timer AND the wait. This should work. + rep is appreciated.:thup:
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
Make sure you're looking for living creeps in the playable map area, a dead creep still counts as a creep till it's bones vanish, so just change the condition to number of living units owned by player 12 equal to 0
 

jomik

New Member
Reaction score
17
Don't ask for +rep :D

- This wont check for the level though mate, I think he wants that :p
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
I didn't really ask for a +rep. I just said it is appreciated if you do.
 

jomik

New Member
Reaction score
17
Np skyblade :D Dameon is right btw :O I usually remove creeps when they die if I make a td though :D Or they might lag.
 
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