A little more information: Using this method is great for controlling the pushable aspect for team based games. One thing to mention though. Don't forget that by setting the pathing priority to everything equally, you are turning off pushable for EVERYONE. In a standard team game, you'll probably want to do something like
DO NOT set the pushable setting for two enemies
DO set pushable for a player towards himself (Ex: Turn Player 4 pushable On towards Player 4) DO set pushable between allies on a team (Ex. Turn Player Ally6 pushable On towards Player 4 && Turn Player 4 Pushable On towards Ally6)
If using the pick each player in (allies of (player X)) function, don't forget this excludes player X, so youll want to define it outside the loop.
ckSynergy AuthorPushable Priorities, Allies, Enemies, and Units
Note: This is for my own reference, and also to help out others who may be wondering about this.
Data Module -> Units Tab -> Selected Unit -> Movement: Push Priority
This is a simple function. By default, units with a higher push priority can force units with a lower push priority out of the way. Units with a lower or equal push priority cannot push units of a equal or higher push priority.
We're going to be looking at EQUAL PRIORITY, which opens up some options for us. Units with equal push priorities are a little unique. By default, they cannot push each other out of the way but this is where the trigger action "Set Alliance Aspect" comes into play which allows us to make them PUSHABLE!
Note: Remember, the default is OFF, not ON. When you realize you have to turn things ON, it becomes much easier because then you just deal with allies, not enemies.
Pushable Allies, Non-Pushable Enemies: Using Alliance Aspect
So we have our two units both with an equal push priority. In the trigger module, we can setup our pushable in one of two ways.
Method One: Allies push each other
(Action) Set alliance - This will set it up both ways, so setting the alliance to "allies with pushable" makes the all allied units with equal priority able to push each other out of the way when moving.
Method Two: Player X can push player Y, but player Y cant push Player X
Now lets say player 2 is a computer and we dont want our allied (or enemy) computer player to push us, but we want to push them. This is where we set the alliance aspect.
In the trigger module, first define a new (Action)
:: Set alliance between player 1 and 2 to Ally
Then add a new (Action): Set Alliance Aspect
:: Player - Turn Player 2 Pushable On towards Player 1
This will allow us (player 1) to push the allied computer (player 2) out of the way, but they wont be able to push our units out of the way.
Push Allies, Cant push Enemies
By now you should have the hang of it.
(Action) Set Alliance: Player - Make Player X and Ally Y treat each other as _allies and pushable_
(Action) Set Alliance: Player - Make Player X and Enemy Z treat each other as Enemy
The trick to remember is, a units pathing priority takes precedence. Units with a higher value will ALWAYS push lower priority units out of the way. However, EQUAL pathing DEFAULTS TO OFF (allies and enemies can NOT be pushed) but CAN BE TURNED ON VIA TRIGGERS (So allies or enemies CAN be pushed)!