making income

dannyboydude

Ultra Cool Member
Reaction score
33
I was thinking of making a line tower war map .
But i have no idea how to make income when you send a certain creep.
If:) any of you know please could you tell me or show me how to actually make income please.
 

Malkier

New Member
Reaction score
2
dunno how the summon/spawning works with line tower wars but for the income i woudl just add
set income[player number of triggering player] to income[player number of triggering player] + x
and have a periodic event or a timer event to pick every player and add income[player number of picked player] to picked player's current gold
 

dannyboydude

Ultra Cool Member
Reaction score
33
so its like when a creep is spawned some trigger catches the numbers and adds to a base of income?
 

AdamGriffith

You can change this now in User CP.
Reaction score
69
Code:
Income 01
    Events
        Unit - A unit enters Region 000 <gen>
    Conditions
    Actions
        If ((Unit-type of (Triggering unit)) Equal to Footman) then do (Set Income[(Player number of (Owner of (Triggering unit)))] = (Income[(Player number of (Owner of (Triggering unit)))] + 1)) else do (Do nothing)
        If ((Unit-type of (Triggering unit)) Equal to Knight) then do (Set Income[(Player number of (Owner of (Triggering unit)))] = (Income[(Player number of (Owner of (Triggering unit)))] + 2)) else do (Do nothing)

Let's say that Region 000 is the region around the building that you are training units.
In this trigger, footmen give +1 and knights give +2

Code:
Income 02
    Events
        Time - Every 15.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                Player - Set (Player((Integer A))) Current gold to (((Player((Integer A))) Current gold) + Income[(Integer A)])

This would give the income to players every 15 seconds.
 
1

131ackout

Guest
Is "income" a variable like this:

Code:
Income 02
    Events
        Time - Every 15.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                Player - Set (Player((Integer A))) Current gold to (((Player((Integer A))) Current gold) + [COLOR="Red"]Income[/COLOR][(Integer A)])
 

doin

New Member
Reaction score
1
what you can also do is let the trigger increase income equal to the amount of the point-value of the unit.
Point-value is a field in the object editor.
Code:
Red Increase
    Events
        Unit - A unit enters WhateverRegion <gen>
    Conditions
    Actions
        Set IncomeRed = (IncomeRed + (Point-value of (Triggering unit)))
If you do this, you don't have to check on the unit-type, therefor, a lot less triggering IMO.

let me know what you did.
 
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