So I have two regions that both have a trigger that removes any units that enter that region. This works so that when the unit walks from one region into the other it's then removed and visa versa if you enter the first region. But the problem is I also try to spawn the walking unit inside one of the regions, and tell him to move to the other region - The unit created is spawned inside one of the regions depending on choise.
But I'm coming short on that, cuz' asap he is created that triggers the event that he actually just moved into the region, and then instantly removes him.
Is there a way for me to spawn a unit inside a region without it triggering that the spawned unit, is actually entering the first region. I thought about creating a spawn point outside the region but that won't work. I also thought about using a unit group and a timer like a "invurnability period" but that's massive overload.
Any ideas - if anyone got like an ich about it, I'll be happy to PM triggers for more details.
You could add a 0.0625-second dummy behavior to them and set a condition in the Unit Enters Region trigger to ensure the triggering unit does not have said behavior.
Create a Buff behavior (let's call it PreserveUnit), then go to the Stats tab and set Duration to 0.0625, which is one frame of game time.
In your unit creation event, add a Pick Each Unit in Unit Group action, using the Last Created Units (assuming you made them all with one command), and in the loop, use an Add Behavior To Unit action with the PreserveUnit behavior and Picked Unit.
In your Unit Enters Region trigger, add a "Not" condition, and inside it, add a "Unit Has Behavior" condition using Triggering Unit and the PreserveUnit behavior.
If you don't mind - it's been quite a while since I've used the editor so sort of rusted on some points, especially the data editor. [1] Solved. [2] is there a way for me to remove the rally point set from a command center. Like reset the line it creates when you right click the rally. It sets the rally, and then I'd like it to remove it. And [3] how do I change the rally point ability, to ONLY being able to target buildings, and not points on the ground, or units and [4] EDIT: Solved.
1. Reduce the separation radius and inner radius in the unit's Movement tab.
2. I'd say that using a "Unit Uses Ability" event would probably trigger for setting a rally point, and then you could use a Issue Order (Order Targeting Point) to fix the rally point.
3. Check out the Command Center Rally ability in the data editor. Remove the command that has its "Set on ground" box checked.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Yo!
So I have two regions that both have a trigger that removes any units that enter that region. This works so that when the unit walks from one region into the other it's then removed and visa versa if you enter the first region. But the problem is I also try to spawn the walking unit inside one of the regions, and tell him to move to the other region - The unit created is spawned inside one of the regions depending on choise.
But I'm coming short on that, cuz' asap he is created that triggers the event that he actually just moved into the region, and then instantly removes him.
Is there a way for me to spawn a unit inside a region without it triggering that the spawned unit, is actually entering the first region. I thought about creating a spawn point outside the region but that won't work. I also thought about using a unit group and a timer like a "invurnability period" but that's massive overload.
Any ideas - if anyone got like an ich about it, I'll be happy to PM triggers for more details.
You could add a 0.0625-second dummy behavior to them and set a condition in the Unit Enters Region trigger to ensure the triggering unit does not have said behavior.
Create a Buff behavior (let's call it PreserveUnit), then go to the Stats tab and set Duration to 0.0625, which is one frame of game time.
In your unit creation event, add a Pick Each Unit in Unit Group action, using the Last Created Units (assuming you made them all with one command), and in the loop, use an Add Behavior To Unit action with the PreserveUnit behavior and Picked Unit.
In your Unit Enters Region trigger, add a "Not" condition, and inside it, add a "Unit Has Behavior" condition using Triggering Unit and the PreserveUnit behavior.
@DeProgrammer: Go
Works. Thanks a lot.
If you don't mind - it's been quite a while since I've used the editor so sort of rusted on some points, especially the data editor. [1] Solved. [2] is there a way for me to remove the rally point set from a command center. Like reset the line it creates when you right click the rally. It sets the rally, and then I'd like it to remove it. And [3] how do I change the rally point ability, to ONLY being able to target buildings, and not points on the ground, or units and [4] EDIT: Solved.
Thanks a lot.
@Deeweext: Go
1. Reduce the separation radius and inner radius in the unit's Movement tab.
2. I'd say that using a "Unit Uses Ability" event would probably trigger for setting a rally point, and then you could use a Issue Order (Order Targeting Point) to fix the rally point.
3. Check out the Command Center Rally ability in the data editor. Remove the command that has its "Set on ground" box checked.