HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Distribution of Wealth

08-21-2006, 08:31 PM#1
st33m
So, I have a trigger that, every 45 seconds adds 100 gold to a player, and then (I guess I could combine these with ease) adds 450 gold for each gold mine owned divided by the number of players on the team to each player's gold.

Trigger:
Gold Mine Triggers
Collapse Events
Time - Every 45.00 seconds of game time
Conditions
Collapse Actions
Set Temp_Group = (All allies of Player 1 (Red))
Collapse Player Group - Pick every player in Temp_Group and do (Actions)
Collapse Loop - Actions
Player - Add 100 to (Picked player) Current gold
Player - Add ((450 x RedMinesOwned) / (Number of players in Temp_Group)) to (Picked player) Current gold
Custom script: call DestroyForce (udg_Temp_Group)
Set Temp_Group = (All allies of Player 7 (Green))
Collapse Player Group - Pick every player in Temp_Group and do (Actions)
Collapse Loop - Actions
Player - Add 100 to (Picked player) Current gold
Player - Add ((450 x GreenMinesOwned) / (Number of players in Temp_Group)) to (Picked player) Current gold
Custom script: call DestroyForce (udg_Temp_Group)

Instead, it appears to be just adding the gold to red. Not sure about green, btu I assume it would work the same way. Another interesting note is that it IS infact dividing the gold, but not giving it to the other players.
08-21-2006, 08:47 PM#2
Freakazoid
Hmm I dont see any problems.

Are you sure they are allies ? Create a trigger at the map init to be sure.

I will look into it :)
08-21-2006, 09:47 PM#3
st33m
08-21-2006, 10:42 PM#4
Freakazoid
Don't bealive everything that you see (or hear), but have you tried what I told you ??
08-21-2006, 11:45 PM#5
st33m
No, I have not. Maybe you're right, but the information is right there... so I dont see how (no offense...).
08-22-2006, 10:29 AM#6
Freakazoid
Just do it, WE is a mysterious program!
08-22-2006, 10:42 AM#7
Ignitedstar
Yeah, this happens to me, too. I think "Scenario Properties" does not count for triggers.
08-22-2006, 05:44 PM#8
st33m
Allright.

So what SHOULD I do?

Check if they are in a group SHOULD fail, if what you're saying is true. Should I add them to a group at map initialization?
08-22-2006, 06:25 PM#9
Freakazoid
Just make them allies/enemies, 1 by 1 player.
08-22-2006, 07:10 PM#10
st33m
Okay.