If you really want, you can do it directly like DoW. You will need a battery Ability on the control point. Battery abilities cast their effect on any unit that right clicks on them (Smart Command)
The battery ability will run a create persistent effect on the unit targeting it. This persistent will be channeled. The expire effect will run an apply behavior effect on the caster (Which is the control point). The behavior will have the Player field set to Target, thereby transferring control to the player who was the target of the effect (the right clicking units). This may be incorrect, would require some testing of the interaction of battery effects with targeting and what it considers the source/target. If all else fails, specify the capture persistent effect in the behavior to get more precise results.
This directly replicates the DoW style capturing, since with the persistent being channeled, breaking off will end the capture. As for the resources themselves, the above posted solution is correct, simply place a behavior on the point that has a periodic modify player effect.
You would probably have 2 battery abilities, one that is active when the point has already been captured and thus will only react to enemy units casting on it, and another for inactive state, and react to any units targeting it.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
If you really want, you can do it directly like DoW. You will need a battery Ability on the control point. Battery abilities cast their effect on any unit that right clicks on them (Smart Command)
The battery ability will run a create persistent effect on the unit targeting it. This persistent will be channeled. The expire effect will run an apply behavior effect on the caster (Which is the control point). The behavior will have the Player field set to Target, thereby transferring control to the player who was the target of the effect (the right clicking units). This may be incorrect, would require some testing of the interaction of battery effects with targeting and what it considers the source/target. If all else fails, specify the capture persistent effect in the behavior to get more precise results.
This directly replicates the DoW style capturing, since with the persistent being channeled, breaking off will end the capture. As for the resources themselves, the above posted solution is correct, simply place a behavior on the point that has a periodic modify player effect.
You would probably have 2 battery abilities, one that is active when the point has already been captured and thus will only react to enemy units casting on it, and another for inactive state, and react to any units targeting it.