On my map, I have two refinery locations. I am doing a check on every spawn wave on whether or not a player on a team owns a refinery, and if they do, I want to award every member of the team 100 minerals. So I did this:
Player Group - Pick each player in Team 1 and do (Actions)
Actions:
Unit Group - Pick each unit in (Refinery units in (Entire map) owned by player (Picked player) matching Excluded; Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions:
Player Group - Pick each player in Team 1 and do (Actions)
Actions:
Player - Modify player (Picked player) Minerals: Add 100
And the game is throwing an error, but I can't find any other way to award every player on the team 100 minerals if any one of the teammates owns the refinery.
-set it false
-pick every play in team
- do a if unitcount in unitgrp pick each refinery for picked player > 0 set boolean value true
- after the pick if boolean = true give every teammember 100 mins
enable window testing and the debug window and read the errors
I mean based on my experience and your descripton I'm able to guess the error text but never sure
Thanks for the reply. But what if I want to award the minerals based on how many refineries they have? One team can capture both refineries and then they'd get 200 mins.
You are getting errors because the Pick Player isn't returning the value you think it does. Its fine if you use it once within your scope, but you used it TWICE!
You need to avoid the second Action: Player Group - Pick each player in Team 1... that way you only use the Pick Player function once within your scope.
Thanks for the reply. But what if I want to award the minerals based on how many refineries they have? One team can capture both refineries and then they'd get 200 mins.
instead of a boolean use an integer and add 1 everytime unitcount refinery is > 0
after that add integer*100 minerals to every player of the team
On my map, I have two refinery locations. I am doing a check on every spawn wave on whether or not a player on a team owns a refinery, and if they do, I want to award every member of the team 100 minerals. So I did this:
Player Group - Pick each player in Team 1 and do (Actions)
Actions:
Unit Group - Pick each unit in (Refinery units in (Entire map) owned by player (Picked player) matching Excluded; Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions:
Player Group - Pick each player in Team 1 and do (Actions)
Actions:
Player - Modify player (Picked player) Minerals: Add 100
And the game is throwing an error, but I can't find any other way to award every player on the team 100 minerals if any one of the teammates owns the refinery.
Thanks for help in advanced!
create a boolean for every team
-set it false
-pick every play in team
- do a if unitcount in unitgrp pick each refinery for picked player > 0 set boolean value true
- after the pick if boolean = true give every teammember 100 mins
enable window testing and the debug window and read the errors
I mean based on my experience and your descripton I'm able to guess the error text but never sure
@b0ne123: Go
Thanks for the reply. But what if I want to award the minerals based on how many refineries they have? One team can capture both refineries and then they'd get 200 mins.
@GrimmySnarf: Go
You are getting errors because the Pick Player isn't returning the value you think it does. Its fine if you use it once within your scope, but you used it TWICE!
You need to avoid the second Action: Player Group - Pick each player in Team 1... that way you only use the Pick Player function once within your scope.
instead of a boolean use an integer and add 1 everytime unitcount refinery is > 0
after that add integer*100 minerals to every player of the team
edit: you can't use pick in a pick
@sandround: Go
But if I remove the second pick, then only the player with a refinery is awarded the 100, correct?
Will try your method b0ne, thanks!