Income Help

M

Mythic Fr0st

Guest
Bah... frost - his income is dependent on stuff... +1 is way too simple. Plus - he won't have room for development if he makes it like that.
Heroes give one income, creeps another, something else gives yet another diffrent income, so wont work for him.


Yes it will

Code:
vent
   - A unit dies
Conditions dying unit is a hero equal to true
Actions
   - set P_N = player number of owner of killing unit
   - set Income[P_N] = Income[P_N] + 1
   - Game display to all players Name of owner of killing unit has + Income[P_N] income!

Code:
vent
   - A unit dies
Conditions dying unit is a hero equal to false
Actions
   - set P_N = player number of owner of killing unit
   - set Income[P_N] = Income[P_N] + 3
   - Game display to all players Name of owner of killing unit has + Income[P_N] income!

this trigger is 100031571% customizable and works with everything, there IS no other way for him to do this, with "ease" unless in jass, but its the same process lolz
 

Thanatos_820

Death is Not the End
Reaction score
91
Yes it will

Code:
vent
   - A unit dies
Conditions dying unit is a hero equal to true
Actions
   - set P_N = player number of owner of killing unit
   - set Income[P_N] = Income[P_N] + 1
   - Game display to all players Name of owner of killing unit has + Income[P_N] income!

Code:
vent
   - A unit dies
Conditions dying unit is a hero equal to false
Actions
   - set P_N = player number of owner of killing unit
   - set Income[P_N] = Income[P_N] + 3
   - Game display to all players Name of owner of killing unit has + Income[P_N] income!

this trigger is 100031571% customizable and works with everything, there IS no other way for him to do this, with "ease" unless in jass, but its the same process lolz

Thanks Mythic :). +Rep but I also need the the trigger to see how much income he's/she's is getting. Like for example:

Thanatos Income: 68

But the integer increases as you kill and text changes too.
 
M

Mythic Fr0st

Guest
Display the integer, you display the current value

Variables (just P_N, integer, no array)
Code:
Event
   - every 20.00 seconds
Conditions
Actions
   - Pick every player in all players and do actions
        loop
          Set P_N = Player number of picked player
          if / then / else, multiple functions
            IF picked player slot status equal to IS playing
            Then Game - Display to all players the text (Name of picked player) + " has " + Income[P_N] + " Income!"

that will display the income of players in the game, (including computers)

If you want it to display all players income whether or not they are playing, just remove the IF condition,
 
Reaction score
107
use 2 triggers.
make a integer variable thats an array, of size the highest player number that is player controlled.

Code:
Income Unit Kill
    Events
        Unit - A unit Dies
    Conditions
        ((Triggering unit) is A Hero) Equal to False
    Actions
        Set YOURINTEGERARRAYVARIABLE[(Player number of (Owner of (Killing unit)))] = (YOURINTEGERARRAYVARIABLE[(Player number of (Owner of (Killing unit)))] + 1)

this one for unit kills

Code:
Income Hero Kill
    Events
        Unit - A unit Dies
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Set YOURINTEGERARRAYVARIABLE[(Player number of (Owner of (Triggering unit)))] = (YOURINTEGERARRAYVARIABLE[(Player number of (Owner of (Triggering unit)))] - 10)
        Set YOURINTEGERARRAYVARIABLE[(Player number of (Owner of (Killing unit)))] = (YOURINTEGERARRAYVARIABLE[(Player number of (Owner of (Killing unit)))] + 25)

this one for hero kills

EDIT::
bleh didnt notice there was a second page xD
 
M

Mythic Fr0st

Guest
lol

PS , ARRAY size does not matter, array size 1, can load up to 8XXX value (in the 8000's)

array size 3000, can load up to 8XXX it makes no difference
 
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