I'm having an issue with my triggers for some pathing i'm doing. I'm doing a check to see if a unit belongs to a player from player group A or player group B and then having it move to its designated point depending on which team the player belongs to.
I have players -1 through 6 on team a and players 7 through 13 on team B.
I have a condition that looks like this
Comparison
Value 1: Triggering Unit
Operator: ==
Value 2: Agent Of Player For Unit
Unit: Triggering Unit
Player: Player From Player Group
Index: 1
Group: A
But this will only return the value for player 1 in that group, not all members of that group.
You can only compare data with the same type to each other. For eg, player to player, player group to player group. For your question, the easiest way is to compare value of funcion: "Player is in player group" with value "true". For player, it will be owner of triggering unit( unit you want to check). Here are the example:
Edit: Seem like you haven't had the player group A or B yet, you just mentioned team A and B. Create a player group variable and add player you want to their group first before using this condition
You can only compare data with the same type to each other. For eg, player to player, player group to player group. For your question, the easiest way is to compare value of funcion: "Player is in player group" with value "true". For player, it will be owner of triggering unit( unit you want to check). Here are the example:
Edit: Seem like you haven't had the player group A or B yet, you just mentioned team A and B. Create a player group variable and add player you want to their group first before using this condition
I had my groups set up. I did it the way you recommended but for whatever reason it still is not working for me. Logically your method seems perfect, I'm not sure what i was thinking before, just not used to programming much i guess.
I have the groups A and Groups B as global variables and at map initialization players are placed in the groups like this
When put into action, units from team A will walk into a region and then mill around that area doing nothing in particular. Am i not building groups correctly?
Hello.
I'm having an issue with my triggers for some pathing i'm doing. I'm doing a check to see if a unit belongs to a player from player group A or player group B and then having it move to its designated point depending on which team the player belongs to.
I have players -1 through 6 on team a and players 7 through 13 on team B.
I have a condition that looks like this
Comparison Value 1: Triggering Unit Operator: == Value 2: Agent Of Player For Unit Unit: Triggering Unit Player: Player From Player Group Index: 1 Group: A
But this will only return the value for player 1 in that group, not all members of that group.
@rodnik: Go
You can only compare data with the same type to each other. For eg, player to player, player group to player group. For your question, the easiest way is to compare value of funcion: "Player is in player group" with value "true". For player, it will be owner of triggering unit( unit you want to check). Here are the example:
Edit: Seem like you haven't had the player group A or B yet, you just mentioned team A and B. Create a player group variable and add player you want to their group first before using this condition
I had my groups set up. I did it the way you recommended but for whatever reason it still is not working for me. Logically your method seems perfect, I'm not sure what i was thinking before, just not used to programming much i guess.
I have the groups A and Groups B as global variables and at map initialization players are placed in the groups like this
What am i missing here?
When put into action, units from team A will walk into a region and then mill around that area doing nothing in particular. Am i not building groups correctly?
@rodnik: Go
I think I have it working, thanks for your help!