Need help with a TD

Vamtiin

New Member
Reaction score
1
Hello, I am working on a TD map. I just need one little question answered...

How can I do so all players get like 100 gold each 30 secs?
 
Reaction score
65
Code:
Time - Every 30.00 seconds of game time
Player - Add 100 to Player 1 (Red) Current gold
Player - Add 100 to Player 2 (Blue) Current gold
...
Player - Add 100 to Player 12 (Brown) Current gold
Do that to every player you want to give the gold to.
 
I

IndianSummer

Guest
I suggest giving 50 gold every 15 seconds or 25 gold every 7.5 seconds, just to get no situations like "Damn ! I have 1 gold too less :banghead: "
Just my opinion of gold flow xD
 
I

IKilledKEnny

Guest
Here is amuch simpler, less laggy way to do it:

Code:
Untitled Trigger 001
    Events
        Time - Every 30.00 seconds of game time
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Player - Add 100 to (Picked player) Current gold
 
S

Sunny_D

Guest
less laggy?? doubt that ;) with your trigger you are giving 16 players gold (All players = Player 1-12, and the 4 neutral players)

but that a better overview within the trigger nonetheless ^^
 

Demi666

New Member
Reaction score
127
Code:
Gold Thingy
    Events
        Time - Every 10.00 seconds of game time
    Conditions
    Actions
        Player - Add 100 to (Matching player) Current gold
 

Joker(Div)

Always Here..
Reaction score
86
demi, your trigger is wrong. Heres the correct version
Code:
Untitled Trigger 001
    Events
        Time - Every 30.00 seconds of game time
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Player - Add 100 to (Picked player) Current gold
 

sevensc

New Member
Reaction score
8
Another idea to consider:

Make a variable called something like "activePlayers" of type "Player Group" then make a couple triggers:

Code:
Events
    Map initialization
Actions
    Set activePlayers = (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User)))

Code:
Events
        Time - Every 30.00 seconds of game time
    Conditions
    Actions
        Player Group - Pick every player in (activePlayers) and do (Actions)
            Loop - Actions
                Player - Add 100 to (Picked player) Current gold

You can also make a trigger that removes a player from "activePlayers" when they leave or are defeated/kicked.
 
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