Gold Trigger

DoubleDraGoN

New Member
Reaction score
2
Looking to have starting resource at certain value and have gold in every 7 seconds, can't find in triggers or gameplay const.
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Code:
Untitled Trigger 002
    Events
        Time - Every 7.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                Player - Add 12 to (Player((Integer A))) Current gold
Code:
Untitled Trigger 003
    Events
        Map initialization
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                Player - Set (Player((Integer A))) Current gold to 678
¨¨
Now, where did I find this? In the trigger editor, yes. :)
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
Starting resources:

Code:
Untitled Trigger 001
    Events
        Time - Elapsed game time is 1.00 seconds
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Player - Set (Picked player) Current gold to 750
                Player - Set (Picked player) Current lumber to 750

Income:

Code:
Untitled Trigger 001
    Events
        Time - Every 7.00 seconds of game time
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Player - Set (Picked player) Current gold to ((Player 1 (Red) Current gold) + 1)
                Player - Set (Picked player) Current lumber to ((Player 1 (Red) Current lumber) + 1)
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Reread your triggers there Rheias? :)
But, yeye, he gets it ? :p
To thread starter; use "Add player propery" not "Set" when you give the players gold each 7 seconds...Not like rheias did there.

Edit; @napa

>>Set (Picked player) Current lumber to ((Player 1 (Red) Current lumber) + 1)
It should not be (Player 1(Red)s Current Lumber), but the Picked Players current lumber +1.
 

w00t22

CSS L4D DoD? Steam ID = w00t22
Reaction score
43
yea plus rheias has leaks from player group so go with Many times
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
woot22, no it does not leak, its "All Players"
But, yes, you got a point, I also like ManyTimes' trigger the most. :)
It's one hell-of-a-good-trigger ManyTimes got there:eek:
 

NapaHero

Back from the dead...
Reaction score
43
Reread your triggers there Rheias? :)
But, yeye, he gets it ? :p
To thread starter; use "Add player propery" not "Set" when you give the players gold each 7 seconds...Not like rheias did there.

Edit; @napa

>>Set (Picked player) Current lumber to ((Player 1 (Red) Current lumber) + 1)
It should not be (Player 1(Red)s Current Lumber), but the Picked Players current lumber +1.

Gah, I haven't see that :p

However, I agree that your trigger is best.
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
I'm sorry! I did this in a rush, however, obiviously I should have re-read my triggers. Yes ManyTimes is quite right! I do apologize.

By the way, when using All Players, there is no leak.

Edit:
For the record, in Jass (what really matters, the core of things) Add and Set (Original + Value) are the same, even more, the setting is quicker, so, my trigger is slightly better if you remember to switch Player(1) to Picked Player.
 
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