Hello all, I was wondering what the best way would be to change a Xel'naga watch tower to function as a call-of-duty style control point. Basically, each team would try to "capture" this tower, and once they capture it, it remains theirs until someone else captures it, whether there is a unit there or not. Also, to capture the tower, a team must be the only unit around the tower for about 8 seconds.
I was wondering if there was some relatively easy method for doing this in the data editor for the Tower Capture ability, or if I would be better off using triggers for this and controlling the tower with triggers. If I need to use triggers, I could probably figure the triggers out, but I would need help in learning how to control the Xel'naga tower's status with triggers. Thanks in advance.
None.
I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.
I would use triggers in combination with data.
Data:
- Use a buff that periodically (-> set period time to the checking interval time) executes a check for a unit around using a
- "search area" effect that can capture (exclude player, allied, neutral, dead, hidden, projectile, structure, requires ground, enemy). The search effect should have a max of 1 unit as it only needs to find 1 unit.
- Add a dummy effect (= empty set effect) and execute that on the found unit within the search effect.
Triggers:
- The dummy effect then needs to start a trigger. The event is "effect used".
- The triggering target unit owner is the player that tries to capture. You could check the surroundings within a trigger now via a loop over all units in the area (= iterate over unit group). Else, the closest person is always capturing as that unit will be used in the effect and therefore appears in your trigger. So, you could abort capturing, if multiple players try to capture the same tower at once. Use the same filter as you did in the data.
- You can store the progress within the tower's custom value. Every unit can save up to 64 real values as custom values only usable via triggers. You could use 1000 as the uncaptured and use 1000 to 1100 as the counter for team A and 1000 to 900 for team B. If you have multiple teams, I would suggest using 1 counter and a second custom value storing the team information (-> every team needs a number).
- When it is captured, just transfer the ownership.
That's basically how I implemented the captureable warp gates in my arcade map "Temple Siege 2".
Okay I got it to work using a similar method. Thank you!
None.