I have a move that my hero unit uses to target units that are already in the world to recruit them. I current have this set up as a behavior that changes player control like the Neural Parasite. I want this move to be limited by the supply of the unit vs. the players current supply count. So for example if you have 1 supply left you could recruit a marine but not a siege tank.
Problem is I can't figure out how to get the validators to work for this. I see the Player Food Available but it only allows me to compare versus a fixed value. I wish I could make heads or tails of how this function validator works because it seems like it might hold the secret but I'm lost. Any help would be greatly appreciated!
You can always make a huge list using Combine validators e.g. a Combine-AND: "Player supply available"+"Target unit compare field: supply" for every supply number in the game, then stuff them all in a Combine-OR to use as the main validator. Don't forget the case "supply>=0" which should go directly in the Combine-OR bracket to allow controlling supply-neutral and supply-generating units.
Thanks, that ended up working. Luckily I only need to worry about 1 to 3 supply units so didn't take too much copy and pasting. Future reference for anyone else that needs to do something like this:
A, make sure you do a modify unit and change ownership instead of a behavior or else your supply won't change.
And B, the compare unit field is Food, not Supplies as it shows up on the unit card. Also remember that supply is counted backwards from the way it's shown, so a Marine is -1 supply.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have a move that my hero unit uses to target units that are already in the world to recruit them. I current have this set up as a behavior that changes player control like the Neural Parasite. I want this move to be limited by the supply of the unit vs. the players current supply count. So for example if you have 1 supply left you could recruit a marine but not a siege tank.
Problem is I can't figure out how to get the validators to work for this. I see the Player Food Available but it only allows me to compare versus a fixed value. I wish I could make heads or tails of how this function validator works because it seems like it might hold the secret but I'm lost. Any help would be greatly appreciated!
You can always make a huge list using Combine validators e.g. a Combine-AND: "Player supply available"+"Target unit compare field: supply" for every supply number in the game, then stuff them all in a Combine-OR to use as the main validator. Don't forget the case "supply>=0" which should go directly in the Combine-OR bracket to allow controlling supply-neutral and supply-generating units.
@Photoloss: Go
Thanks, that ended up working. Luckily I only need to worry about 1 to 3 supply units so didn't take too much copy and pasting. Future reference for anyone else that needs to do something like this:
A, make sure you do a modify unit and change ownership instead of a behavior or else your supply won't change.
And B, the compare unit field is Food, not Supplies as it shows up on the unit card. Also remember that supply is counted backwards from the way it's shown, so a Marine is -1 supply.