Trying to figure out why this trigger isn't working

N

nitram0606

Guest
Send Wave
Events
Time - WaveTimer expires
Conditions
Actions
-------- Next Wave --------
Set Wave = (Wave + 1)
-------- Victory / Defeat --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((This trigger) is on) Equal to False
Then - Actions
Skip remaining actions
Else - Actions
Set Bounty = (Min((5 + (Wave / 4)), 20))
Set BountyString = (+ + (String(Bounty)))
Set CreepType = (Random level Wave creep unit-type)
Player - Set Creepster handicap to 100.00%
Unit - Create 1 CreepType for Neutral Passive at (Center of Spawn bottom left <gen>) facing Default building facing degrees
Player - Set Creepster handicap to ((1.00 x (1.00 + 2.00)) / (Max life of (Last created unit)))%
Unit - Remove (Last created unit) from the game
Player - Set name of Creepster to (Wave + (String(Wave)))
Set WaveCurrentCount = (Min((8 + (Wave / 4)), 20))
-------- For number of units to summon --------
For each (Integer WaveIndexA) from 1 to LiveStartingValues, do (Actions)
Loop - Actions
Unit - Create 1 CreepType for Creepster at (Center of Spawn bottom left <gen>) facing Default building facing degrees
Unit - Set the custom value of (Last created unit) to 1
Unit - Order (Last created unit) to Move To (Center of sbl 2 <gen>)
-------- Short break --------
Wait 0.50 seconds
-------- Next wave starts soon --------
Wait until ((Player 5 (Yellow) Food used) Equal to 0), checking every 1.00 seconds
Countdown Timer - Start WaveTimer as a One-shot timer that will expire in 7.50 seconds


I improvised it from a sample td on here, wondering if i changed something incorrectly. "Creepster" is the player 5 computer by the way.

So, I think the reason has to do with the fact that my computer player has no "food" so therefore perhaps cannot create the units, which require 1 food each for the trigger to work. My question is, how do i set Player5 food to be permanently at say, 100.
 

ZiggyMcjoney

Data editor?! AAAHHHHH!
Reaction score
95
1. Put it in code tags (the thing that looks like a #)

2. It's not because of the food count

3. What exactly doesn't work?
 
N

nitram0606

Guest
The creeps just don't spawn, even if i specify a single creep, say a chicken, and put it's cost at 1food. Nothing happens at all.
 
N

nitram0606

Guest
Code:
Send Wave
    Events
        Time - WaveTimer expires
    Conditions
    Actions
        -------- Next Wave --------
        Set Wave = (Wave + 1)
        -------- Victory / Defeat --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((This trigger) is on) Equal to False
            Then - Actions
                Skip remaining actions
            Else - Actions
        Set Bounty = (Min((5 + (Wave / 4)), 20))
        Set BountyString = (+ + (String(Bounty)))
        Set CreepType = (Random level Wave creep unit-type)
        Player - Set Creepster handicap to 100.00%
        Unit - Create 1 Chickenwing for Neutral Passive at (Center of Spawn bottom left <gen>) facing Default building facing degrees
        Player - Set Creepster handicap to ((1.00 x (1.00 + 2.00)) / (Max life of (Last created unit)))%
        Unit - Remove (Last created unit) from the game
        Player - Set name of Creepster to (Wave  + (String(Wave)))
        Set WaveCurrentCount = (Min((8 + (Wave / 4)), 20))
        -------- For number of units to summon --------
        For each (Integer WaveIndexA) from 1 to LiveStartingValues, do (Actions)
            Loop - Actions
                Unit - Create 1 Chickenwing for Creepster at (Center of Spawn bottom left <gen>) facing Default building facing degrees
                Unit - Set the custom value of (Last created unit) to 1
                Unit - Order (Last created unit) to Move To (Center of sbl 2 <gen>)
                -------- Short break --------
                Wait 0.50 seconds
        -------- Next wave starts soon --------
        Wait until ((Creepster Food used) Equal to 0), checking every 1.00 seconds
        Countdown Timer - Start WaveTimer as a One-shot timer that will expire in 7.50 seconds
 
N

nitram0606

Guest
If anyone has a suggestion for a more simple trigger such as, every 30 seconds the creep of my choice is spawned 1 at a time from region X and moves to region Y, with .5 second intervals. Also would like this to be a loop. I could write 200 triggers for all the waves, but there has to be a way to simplify this.
 
N

nitram0606

Guest
Creating Bounty amount per wave

Hey,

I'm trying to make a trigger that will for wave 1 give 2gold per creep killed, and then increase this amount by 100% for wave 2 i.e (4g per creep). Below is what I tried to do but I'm sure I'm missing something.

In the below example "Bounty" is an integer starting at 0, and "BountyString" is a string with no array or value. So my creeps aren't dropping any Gold, what am i doing wrong? Any help would be awesome. :) (I got the creep spawn to work, ty by the way, had to fix my timer)

Code:
Send Wave
    Events
        Time - WaveTimer expires
    Conditions
    Actions
        -------- Next Wave --------
        Set Wave = (Wave + 1)
        -------- Victory / Defeat --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((This trigger) is on) Equal to False
            Then - Actions
                Skip remaining actions
            Else - Actions
        -------- Bounty used for this wave --------
        Set Bounty = (Min((5 + (Wave / 4)), 20))
        Set BountyString = (+ + (String(Bounty)))
        Set CreepType = (Random level Wave creep unit-type)
        Player - Set Creepster handicap to 100.00%
        Unit - Create 1 CreepType for Neutral Passive at (Center of Spawn bottom left <gen>) facing Default building facing degrees
        Player - Set Creepster handicap to ((100.00 x (4.00 + (5.00 x (Real(Wave))))) / (Max life of (Last created unit)))%
        Unit - Remove (Last created unit) from the game
        Player - Set name of Creepster to (Wave  + (String(Wave)))
        Set WaveCurrentCount = (Min((8 + (Wave / 4)), 20))
        -------- For number of units to summon --------
        For each (Integer WaveIndexA) from 1 to WaveCurrentCount, do (Actions)
            Loop - Actions
                Unit - Create 1 CreepType for Creepster at (Center of Spawn bottom left <gen>) facing Default building facing degrees
                Unit - Set the custom value of (Last created unit) to 1
                Unit - Order (Last created unit) to Move To (Center of sbl 2 <gen>)
                -------- Short break --------
                Wait 0.50 seconds
        -------- Next wave starts soon --------
        Wait until ((Creepster Food used) Equal to 0), checking every 1.00 seconds
        Countdown Timer - Start WaveTimer as a One-shot timer that will expire in 5.00 seconds
 

ZiggyMcjoney

Data editor?! AAAHHHHH!
Reaction score
95
Well for one, there is no trigger that is making the creeps drop gold...

Second, theres a few ways to do it.

Find the function Player - Turn Player Flag On/Off (if its not under player, its under Game. don't remember). Then find "Gives Bounty" and turn it on for the creep player.

If you want to trigger it, in that trigger you're doing there do something like

Code:
Set BountyMin = x
Set BountyMax = y

And when a creep dies, do this action:

Code:
Add (Random number between BountyMin and BountyMax) to (Owner of (Killing unit)) Current gold

Note that the second way won't show floating text (you can make it do so with mroe triggers).
 

Steve

Member
Reaction score
3
couldnt you just change the ammount of gold given in the object editor instead of using a trigger?
 

Steve

Member
Reaction score
3
Well I was just saying this guy has this massive trigger for no reason that I can see, so yes turn the bounty on and then change the bounty ammount in the editor.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> this massive trigger for no reason that I can see

In the map that's from, it makes all the sense.
That map also has its own "bounty" trigger that handles the text / gold thingy...
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top