Instead of triggers you could use data.You can use the Xel'Naga tower as a base to work with (Take control of area). Then create a behavior that uses an effect to modify player resources periodically.
1. Make a duplicate of the Xel'Naga tower (The tower capture ability is the key)
2. Create a new behavior and name it. Add this behavior to the duplicated tower.
3. Create a"modify player" effect . Under resources, add 1 (or any other amount) to minerals.
4. Go to your behavior and add this effect into the "periodic" section.
5. Set behavior period to "1" (or more based on how frequently minerals should be recieved).
But the Xel'Naga tower's: Tower Capture ability causes it to get back to it's original form when unit leaves, and automatically changes back to original form if there are multiple units (from multiple players hostile to eachother) players around.
I need a skill with which unit begins transforming, but stops if unit leaves area, no units are around from that player anymore, and the tower is still morphing, stop the morph
And when tower is captured, it needs to stay that way, until enemy unit enters region, and no friendlies there to protect.
Haven't tried the behavior for the player resources yet, so that's the next thing I'll do. Thanks for the information!
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.
Well, anyway, I'll try it. I'm currently doing the Tower Capture ability, with share control, exclusive flags
The Control Point has the skill 'Activate', so the only flaw is, that the player needs to activate manually, and the unit can leave area after activation is done.
The next part [give the unit to player], is done by trigger: Any unit uses this ability->give control to player.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi, I would like to create a Dawn of War type resource system:
1.Unit enters region-> morph the control point from inactive to active, give player control of unit
2.Unit leaves region [if its still morphing][no units left in region, except the control point]-> cancel morph
3.If enemy unit enters region, morph the control point from active to inactive ->then after it finished the 1. starts
4.If hostile units are in region, do nothing (units from multiple players, being enemies)
I would like to ask, if it is only creatable with triggers (i think so), and how?
Any help would be much appreciated!
Instead of triggers you could use data.You can use the Xel'Naga tower as a base to work with (Take control of area). Then create a behavior that uses an effect to modify player resources periodically.
1. Make a duplicate of the Xel'Naga tower (The tower capture ability is the key)
2. Create a new behavior and name it. Add this behavior to the duplicated tower.
3. Create a"modify player" effect . Under resources, add 1 (or any other amount) to minerals.
4. Go to your behavior and add this effect into the "periodic" section.
5. Set behavior period to "1" (or more based on how frequently minerals should be recieved).
6. Test and modify to your liking
But the Xel'Naga tower's: Tower Capture ability causes it to get back to it's original form when unit leaves, and automatically changes back to original form if there are multiple units (from multiple players hostile to eachother) players around.
I need a skill with which unit begins transforming, but stops if unit leaves area, no units are around from that player anymore, and the tower is still morphing, stop the morph
And when tower is captured, it needs to stay that way, until enemy unit enters region, and no friendlies there to protect.
Haven't tried the behavior for the player resources yet, so that's the next thing I'll do. Thanks for the information!
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.
@T0ssWarr1or: Go
I tried that once. It did not work and only gave the neutral player resources, regardless of who controlled it.
@Metalking1417: Go
Well, anyway, I'll try it. I'm currently doing the Tower Capture ability, with share control, exclusive flags The Control Point has the skill 'Activate', so the only flaw is, that the player needs to activate manually, and the unit can leave area after activation is done. The next part [give the unit to player], is done by trigger: Any unit uses this ability->give control to player.