Hi everyone, I'm new to this forum, but not too new to the World Editor. I don't do JASS or such, I just try to come up with a map every once in a while without having the Editor crash all too often (Which sadly is very often since I'm on a Mac).
Anyways, I need some help with a trigger that I can't get to work properly.
It's supposed to count the number of buildings owned by each player and give resources according to following number:
The trigger I'm trying to create is to be similar to the one used in Lords of Europe to calculate income.
Currently my trigger looks like following (Yeah, I know it's crap, that's why I need help):
With this trigger, I just recieve the game message (When playing as Player 1 Red, ofcourse) saying I've recieved 0.000 gold and 0.000 lumber.
So basically, I need a fully functional trigger which works for all players.
Thank you for any help!
Note: The Set IncomeRealVariable above is not complete because it's too long (it seems) but it just continues in the same pattern for the 5 diffrent buildings.
Anyways, I need some help with a trigger that I can't get to work properly.
It's supposed to count the number of buildings owned by each player and give resources according to following number:
Code:
Building 1: # * 50 gold, # * 50/2 lumber
Building 2: # * 75 gold, # * 75/2 lumber
Building 3: # * 100 gold, # * 100/2 lumber
Building 4: # * 125 gold, # * 125/2 lumber
Building 5: # * 150 gold, # * 150/2 lumber
The trigger I'm trying to create is to be similar to the one used in Lords of Europe to calculate income.
Currently my trigger looks like following (Yeah, I know it's crap, that's why I need help):
Code:
Events
[INDENT]Time - IncomeTimer expires
[/INDENT]
Conditions
Actions
[INDENT]Set IncomeRealVariable[1] = (((((((((Real((Number of living Tent units owned by Players[(Integer A)]))) x 50.00) + ((Real((Number of living Lodge units owned by Players[(Integer A)]))) x 75.00)) + ((Real((Number of living Hut units owned by Players[(Integer A)]))) x 100.00)) + ((Real((N
[/INDENT]
[INDENT]Set IncomeRealVariable[2] = (((((((((Real((Number of living Tent units owned by Players[(Integer A)]))) x 50.00) + ((Real((Number of living Lodge units owned by Players[(Integer A)]))) x 75.00)) + ((Real((Number of living Hut units owned by Players[(Integer A)]))) x 100.00)) + ((Real((N
[/INDENT]
[INDENT]Set IncomeRealVariable[3] = (((((((((Real((Number of living Tent units owned by Players[(Integer A)]))) x 50.00) + ((Real((Number of living Lodge units owned by Players[(Integer A)]))) x 75.00)) + ((Real((Number of living Hut units owned by Players[(Integer A)]))) x 100.00)) + ((Real((N
[/INDENT]
[INDENT]Set IncomeRealVariable[4] = (((((((((Real((Number of living Tent units owned by Players[(Integer A)]))) x 50.00) + ((Real((Number of living Lodge units owned by Players[(Integer A)]))) x 75.00)) + ((Real((Number of living Hut units owned by Players[(Integer A)]))) x 100.00)) + ((Real((N
[/INDENT]
[INDENT]Set IncomeRealVariable[5] = (((((((((Real((Number of living Tent units owned by Players[(Integer A)]))) x 50.00) + ((Real((Number of living Lodge units owned by Players[(Integer A)]))) x 75.00)) + ((Real((Number of living Hut units owned by Players[(Integer A)]))) x 100.00)) + ((Real((N
[/INDENT]
.... And so on, one of those for each players ....
[INDENT]Player - Add (Integer(IncomeRealVariable[(Integer A)])) to Players[(Integer A)] Current gold[/INDENT]
[INDENT]Player - Add (Integer((IncomeRealVariable[(Integer B)] / 2.00))) to Players[(Integer B)] Current lumber
Game - Display to Player Group - Player 1 (Red) the text: ((You've recieved + ((String(IncomeRealVariable[1])) + ( gold and + ((String((IncomeRealVariable[1] / 2.00))) + lumber during this income period.)))) + )
Sound - Play Income <gen>
[/INDENT]
With this trigger, I just recieve the game message (When playing as Player 1 Red, ofcourse) saying I've recieved 0.000 gold and 0.000 lumber.
So basically, I need a fully functional trigger which works for all players.
Thank you for any help!
Note: The Set IncomeRealVariable above is not complete because it's too long (it seems) but it just continues in the same pattern for the 5 diffrent buildings.