I want to make an afk trigger. When a player is afk for some time, it activates and turns this player into afk mode. Afk players are controlled by computer by default, but they also share control with their allies. For now everything is right, and can be done easily with triggers.
Here comes my problem:
In my map, every player has its own resources and income. If I want to share control between afk players and its allies, I also have to share resources between them. Otherwise you won't be able to train units with the buildings of the afk player. But if I share resources, you can also spend the resources of the afk player to make units with your buildings. This greatly imbalances the game.
Lets say your ally has 300 minerals, and you have another 300 minerals. If your ally goes afk, then you get control over its units, and he shares resources with you. Then you have 300 + 300 = 600 minerals you can spend in both your buildings and the allied ones. Now lets think about a super powerful building which cost 600 minerals. Then you will be able to get that building too early in the game, so you will end up wining this game.
So what I want is to make the afk ally share control with you, so you can use its buildings spending its resources only, not yours.
Any idea on how to do this?
Make a global variable as a region array of size of 14 by 8192. Then set each region to a unit in the map. If a player doesn't move a unit in 30 seconds, turn on shared control.
You can also check to see if buildings have queued units or upgrades during this time.
I'm not asking about how to implement the afk thing.
My problem is in the red colored part:
Quote:
So what I want is to make the afk ally share control with you, so you can control its buildings "spending its resources only, not yours". Any idea on how to do this?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I want to make an afk trigger. When a player is afk for some time, it activates and turns this player into afk mode. Afk players are controlled by computer by default, but they also share control with their allies. For now everything is right, and can be done easily with triggers.
Here comes my problem: In my map, every player has its own resources and income. If I want to share control between afk players and its allies, I also have to share resources between them. Otherwise you won't be able to train units with the buildings of the afk player. But if I share resources, you can also spend the resources of the afk player to make units with your buildings. This greatly imbalances the game.
Lets say your ally has 300 minerals, and you have another 300 minerals. If your ally goes afk, then you get control over its units, and he shares resources with you. Then you have 300 + 300 = 600 minerals you can spend in both your buildings and the allied ones. Now lets think about a super powerful building which cost 600 minerals. Then you will be able to get that building too early in the game, so you will end up wining this game.
So what I want is to make the afk ally share control with you, so you can use its buildings spending its resources only, not yours. Any idea on how to do this?
@IliIilI: Go
Make a global variable as a region array of size of 14 by 8192. Then set each region to a unit in the map. If a player doesn't move a unit in 30 seconds, turn on shared control.
You can also check to see if buildings have queued units or upgrades during this time.
Too much work, no actions to be considered afk can be captured by most events such as unit is issued order, mouse clicked, etc...
I'm not asking about how to implement the afk thing.
My problem is in the red colored part: