Hi guys. I've got a somewhat complicated problem I've been trying to figure out for the past two days. Here's what I've been trying to do:
I've placed a Zealot and added a behaviour to him called "Red Unit". This marks the zealot as being part of the Red Team (as opposed to the Blue Team). The zealot also has the ability to capture nodes.
So, there's this lonely node, ready for the taking, together with a Barracks nearby. When the Zealot captures the node, since he had "Red Unit", the Barracks gets a behaviour called "Usable By Red". Now, the Barracks has an interact ability on auto cast which Shares Control to anything within a range of 4. On this interact ability I have two validators: the first checks whether the Caster unit has exactly one of "Usable By Red" and the second checks whether the Target unit has exactly one of "Red Unit". This should, at least in my mind, make the Barracks interactable only by the red units.
The problem is that there are two fields for placing validators on the interact ability: one called "Ability - Validators" and another "Ability - Auto Cast Validators". If the validators are placed in "Ability - Validators" then everyone is allowed to purchase stuff from the Barracks while if they are placed in "Ability - Auto Cast Validators) then no one is allowed to interact with the Barracks.
I'm sure there is a way to do this using the data editor only and I seem to be missing it. What would you suggest I do to fix this little problem of mine?
I think using an interact ability is the wrong way to go. Just apply a behavior that sets the buildings owner to the capturing team. Alternately you can use a neutral player which is set up to share control with everyone on the "red team" and another one which shares control with the "blue team" and then capture the building by setting control to the neutral player.
I was going to opt for that but, as far as I know, if I switch the owner of the Barracks to the capturing team then it would allow that team to use the Barracks without being next to it.
Also, your alternative solution did cross my mind, and I'm seriously considering it, but I shied away from it till now because I don't think you can do that solely with the data editor (you'd need to call in some Trigger help). The data editor can only switch control to the Caster's owner (which is a player) and then I would need a trigger to change that to the correct "neutral" player.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi guys. I've got a somewhat complicated problem I've been trying to figure out for the past two days. Here's what I've been trying to do:
I've placed a Zealot and added a behaviour to him called "Red Unit". This marks the zealot as being part of the Red Team (as opposed to the Blue Team). The zealot also has the ability to capture nodes.
So, there's this lonely node, ready for the taking, together with a Barracks nearby. When the Zealot captures the node, since he had "Red Unit", the Barracks gets a behaviour called "Usable By Red". Now, the Barracks has an interact ability on auto cast which Shares Control to anything within a range of 4. On this interact ability I have two validators: the first checks whether the Caster unit has exactly one of "Usable By Red" and the second checks whether the Target unit has exactly one of "Red Unit". This should, at least in my mind, make the Barracks interactable only by the red units.
The problem is that there are two fields for placing validators on the interact ability: one called "Ability - Validators" and another "Ability - Auto Cast Validators". If the validators are placed in "Ability - Validators" then everyone is allowed to purchase stuff from the Barracks while if they are placed in "Ability - Auto Cast Validators) then no one is allowed to interact with the Barracks.
I'm sure there is a way to do this using the data editor only and I seem to be missing it. What would you suggest I do to fix this little problem of mine?
Thanks, Klishu
I think using an interact ability is the wrong way to go. Just apply a behavior that sets the buildings owner to the capturing team. Alternately you can use a neutral player which is set up to share control with everyone on the "red team" and another one which shares control with the "blue team" and then capture the building by setting control to the neutral player.
I was going to opt for that but, as far as I know, if I switch the owner of the Barracks to the capturing team then it would allow that team to use the Barracks without being next to it.
Also, your alternative solution did cross my mind, and I'm seriously considering it, but I shied away from it till now because I don't think you can do that solely with the data editor (you'd need to call in some Trigger help). The data editor can only switch control to the Caster's owner (which is a player) and then I would need a trigger to change that to the correct "neutral" player.