HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Giving An Allies Gold To Yourself After They Leave?

11-19-2002, 11:04 PM#1
Guest
Is it possible to give an allies gold to yourself after they have left the game? Say you have a trigger that sets, upon your ally leaving/dropping from the game, your ally to Full Allied Control (build units for them and share vision) when they are no longer playing. Is it possible to have a trigger that makes that Ally give you their gold/lumber every X seconds of the game?

Example: Red and Blue are allies. Blue drops from the game. Red is given full control of blues units and buildings and is given the gold/lumber that blue has accumulated every 5 seconds of the game.
11-20-2002, 02:23 AM#2
Trav
Periodic Event

If Player X is equal to not playing give "Gold" to Player Y.
If Player X is equal to not playing set "Gold" of Player X to 0.
Player - Add X gold to Player X.
Set Gold = Player X current gold.

Thats one way of doing it. The first two actions won't matter if the guy is still playing.
11-20-2002, 09:06 PM#3
The_Cyberdemon1
I dunno if that works, cuz the players gold may just be deleted. But, you could make this trigger.

Event:
----Every 2 seconds of the game
Action:
----Pick (all players) and do, Set variable GOLDIFYOULEAVE[(Player number of picked player)]

Then, if a player leaves, just add the leaving players gold to the player who needs it. If there is more than one player, just divide the gold up evenly (with arithmetic trigger thing).
11-21-2002, 04:23 AM#4
Guest
I didnt go with either route but I got what I needed. Thanks for the input though.