Village builder income trigger help

Stretch

New Member
Reaction score
0
I am making my own ver of village builder but I am having trouble getting the income triggers right.

The way it worked was you created a specific unit and when it was created you got gold 4 every 30 seconds, you could create mass amounts of these units and end up getting gold every second.

If you don't understand what I mean please ask and I will try explain better. :)
 

Sui-cookie

You can change this now in User CP.
Reaction score
49
You can only bump once a day :/ so try not to do that anymore, k? D:

I assume that you want gold to not be in one huge clump? and 30 seconds after it's trained it gives gold, then 30 sec after that? Each income individual for each unit?
 

Stretch

New Member
Reaction score
0
yes thats exactly how I want it

And sorry I didn't know I have only joined recently :)
 

Stretch

New Member
Reaction score
0
I havn't got any triggers set up for it as I am not sure where to start, I put together a bunch of different ways but deleted once I found they didn't work.
 

DWZ

New Member
Reaction score
2
I know how to make it so that the amount of gold you get every 30 sec increases when you train a unit, but not how to make that. (I probably do know it, but I'm too lazy to make it. >.>)
 

laxperson808

New Member
Reaction score
9
Try something like

Trigger:
  • Gold
    • 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 ((Number of units in (Units owned by (Picked player) of type Peasant)) x 4) to (Picked player) Current gold

Replacing peasents for watever units you want
 

Sui-cookie

You can change this now in User CP.
Reaction score
49
personally, i would use the custom value of the unit.
when it's trained set it to whatever the time incremeant you want the income to be and do something like this:
Trigger:
  • Untitled Trigger 001
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Custom script: call DestroyGroup(udg_Tempunits)
      • Set Tempunits = (Units in (Playable map area))
      • Unit Group - Pick every unit in Tempunits and do (Actions)
        • Loop - Actions
          • Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) - 1)
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Custom value of (Picked unit)) Equal to (==) 0
              • Then - Actions
                • Unit - Set the custom value of (Picked unit) to 30
                • Player - Set (Owner of (Picked unit)) Current gold to (((Owner of (Picked unit)) Current gold) + 1337)
              • Else - Actions


that way, you could define the group to be specific units, thereby giving dif. income for dif. units, and it wouldn't be in a huge clump. :)
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
the trigger sui-cookie posted is good though the custom script "destroy group (udg_...)" should be at the end of the trigger.

however you could as well just give your unit 30 mana, regeneration of 1 mana per second and faerie fire with autocast, targets allowed "self" only using 30 mana. this way your unit will auto-cast faerie fire every 30 seconds, the player can see the countdown in the mana, see the ability, maybe even a cooldown, tooltip, etc. just looks better in my opinion.
of course only if you dont use the mana of the unit in any other way.

well your trigger for this would then look rather easy.
ability is cast
ability == give income ability thingy
give gold to player
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top