Assume the face of a clock. If I have selected an air unit and I click at it's 3 o'clock position, I want that unit to continuously fly in that direction instead of stopping at the way point where I clicked. I feel like this would be easier done via triggers via "ignore orders" or something similar, but I don't do/know triggers very well. There might also be a certain type of "Mover" that I am unaware of that does this already.
If I want the unit to fly to a destination and I want it to hang around that general area until I need it again, I am ok with shift-move to make it fly a pattern via queing its movement.
So, I want it to keep flying in the same direction once it executes it's last given "move" command and has not been given another command (this is so it can be shift-move qued)
The idea is I have a custom "bomber" with a long weapon cooldown with Only Fire While Attacking and Only Fire at Attack Target unchecked. Meaning, as soon as my bomber flys over an acceptable target it just drops its bombs automatically. It doesn't even have an "Attack" button. After this bomber flys over the unit it just attacked, I want it to keep moving in the direction I clicked instead of hovering in place waiting for its 10 second weapon cooldown to expire so it can attack again.
If I understand well, your unit is "Turnable" (this is a Unit flag) but something is missing for your custom "bomber".
I presume your Weapon does some Effects. Maybe even a Behavior is attached.
First thing, make sure you set for your Weapon the value "Moving" to the field "Allowed Movement".
If that only responds to your expectation, you can stop here.
If not, to make it simple, force the unit to move :
Create an Effect of type "Give Order" which executes the Ability "Move".
Create an Effect of type "Persistent" with a sufficient offset (tweak it) and make sure to set Target offset to the caster (that will use the current orientation of your unit).
You should already have an Effect of type "Set". If not, create one. Add the Effect of your Weapon and then the new "Persistent" Effect.
In your Weapon, change the Effect with the new "Set" Effect.
You will need to play with some values but the idea is here. Make the "bomber" move to your destination.
Advanced tips :
You can create a Behavior which executes the "Persistent" Effect. Like this, you can affect your unit with some more changes. Don't forget to set a duration (or a custom removal). For example, you can temporarily disable "Turnable".
Create an Effect of type "Add Behavior" and do the changes in your "Set" Effect.
I will upload my map in progress. For my 2 specific air units, the bomber and the scout, their weapon Allowed Movement is already set to Move. They behave 99% exactly how I want already.
However.
When I right-click/Move to a point on the map, I want the unit to not stop moving at the point that I clicked. Like, I want the Move command to be repeatedly given in the direction the unit is facing *until* I give that unit a new Move order, or I shift+Move to keep it contained in a "pattern."
A real life airplane does not float over its target stationary, they need continuous movement. I am trying to emulate that movement with these 2 units. I want them to specifically behave different than the other units in my map.
While the unit is attacking / bombarding, and so is moving, you can prevent the ability "Move" (duplicate it if necessary) to be executed, by disabling it with a behavior and a prerequisite, for example.
What you want is :
- The attacking unit finds a target.
- The attacking unit moves during the attack.
- The attacking unit cannot accept any other order during the attack.
And then, what happens after the attack ?
I suppose it needs to continue its path. You must have a default destination when the aircraft depleted its ammo.
For instance, in the game Command & Conquer, an aircraft returns to its assigned airpad or airfield.
Unfortunately, I don't know how the "assigned" thingy could be done in StarCraft II. You can search a building on the map and all but which building the unit is attached to ... I don't know.
Another thing :
If you want to simply make your unit turn around in the air, you have to set for a "Unit" :
- A small value to "Turning Rate" (Ex : 72.0)
- A small value to "Acceleration" (Ex : 100.0)
- A small value to "Deceleration" (Ex : 50.0)
- Create a permanent or no expiration behavior which orders the unit to move to the next presumed 90 degrees arc (generally to the right).
- The effect "Give Order" must have a validator which checks the orders' count of the unit.
- The validator only uses an ability link, so you must change your weapon to an auto-ability (same effect).
That's a lot of work if you still are discovering the editor but that's only training then.
Good luck, stay determined.
Have a nice day.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Assume the face of a clock. If I have selected an air unit and I click at it's 3 o'clock position, I want that unit to continuously fly in that direction instead of stopping at the way point where I clicked. I feel like this would be easier done via triggers via "ignore orders" or something similar, but I don't do/know triggers very well. There might also be a certain type of "Mover" that I am unaware of that does this already.
If I want the unit to fly to a destination and I want it to hang around that general area until I need it again, I am ok with shift-move to make it fly a pattern via queing its movement.
So, I want it to keep flying in the same direction once it executes it's last given "move" command and has not been given another command (this is so it can be shift-move qued)
The idea is I have a custom "bomber" with a long weapon cooldown with Only Fire While Attacking and Only Fire at Attack Target unchecked. Meaning, as soon as my bomber flys over an acceptable target it just drops its bombs automatically. It doesn't even have an "Attack" button. After this bomber flys over the unit it just attacked, I want it to keep moving in the direction I clicked instead of hovering in place waiting for its 10 second weapon cooldown to expire so it can attack again.
Hello,
If I understand well, your unit is "Turnable" (this is a Unit flag) but something is missing for your custom "bomber".
I presume your Weapon does some Effects. Maybe even a Behavior is attached.
First thing, make sure you set for your Weapon the value "Moving" to the field "Allowed Movement".
If that only responds to your expectation, you can stop here.
If not, to make it simple, force the unit to move :
You will need to play with some values but the idea is here. Make the "bomber" move to your destination.
Advanced tips :
Have a nice day.
I will upload my map in progress. For my 2 specific air units, the bomber and the scout, their weapon Allowed Movement is already set to Move. They behave 99% exactly how I want already.
However.
When I right-click/Move to a point on the map, I want the unit to not stop moving at the point that I clicked. Like, I want the Move command to be repeatedly given in the direction the unit is facing *until* I give that unit a new Move order, or I shift+Move to keep it contained in a "pattern."
A real life airplane does not float over its target stationary, they need continuous movement. I am trying to emulate that movement with these 2 units. I want them to specifically behave different than the other units in my map.
While the unit is attacking / bombarding, and so is moving, you can prevent the ability "Move" (duplicate it if necessary) to be executed, by disabling it with a behavior and a prerequisite, for example.
What you want is :
- The attacking unit finds a target.
- The attacking unit moves during the attack.
- The attacking unit cannot accept any other order during the attack.
And then, what happens after the attack ?
I suppose it needs to continue its path. You must have a default destination when the aircraft depleted its ammo.
For instance, in the game Command & Conquer, an aircraft returns to its assigned airpad or airfield.
Unfortunately, I don't know how the "assigned" thingy could be done in StarCraft II. You can search a building on the map and all but which building the unit is attached to ... I don't know.
Another thing :
If you want to simply make your unit turn around in the air, you have to set for a "Unit" :
- A small value to "Turning Rate" (Ex : 72.0)
- A small value to "Acceleration" (Ex : 100.0)
- A small value to "Deceleration" (Ex : 50.0)
- Create a permanent or no expiration behavior which orders the unit to move to the next presumed 90 degrees arc (generally to the right).
- The effect "Give Order" must have a validator which checks the orders' count of the unit.
- The validator only uses an ability link, so you must change your weapon to an auto-ability (same effect).
That's a lot of work if you still are discovering the editor but that's only training then.
Good luck, stay determined.
Have a nice day.