HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need help with giving money

06-04-2003, 04:15 PM#1
KrEmAyTu91
Well, its not as easy as "getting money" I want to make it so that when a player leaves, their current gold goes to their allies, distributed evenly.... I have made my own triggers but it doesn't work... here it goes:

I create a variable for each team: numplayersT1, T2, T3, and T4
When the games starts I have in the initialization:
Set numplayersT1 to Number of players in (Team1)

Team 1,2,3,4 is a "player group variable" Which I also within the initialization added the players to the player group BEFORE I added the numplayers initialization.

Now my trigger goes something like this: (sorry, I don't have world editor on this computer where im typing from, so I don't know the exact syntax)

Event: Every 5 seconds of the game
Conditions: Player 1 slot status (is playing) is equal to false
Action: Add player property of (player 1)/(numplayersT1) To (player 2 current gold)
Add player property of (player 1)/(numplayersT1) To
(player 3 current gold)


Obviously player 2 and 3 are the only ones on player 1's team

So, what did I do wrong here?