By default, a unit can select up to seven spots to go to when patrolling ("waypoints"), + it' starting location. How do you limit this to only the start location and ONE waypoint?
And how do you limit the DISTANCE between 2 waypoints?
I think it would work if you use the "Unit is Issued Order" event. Everytime the unit is issued a patrol command, you can:
a) Override old patrol command by issuing the order to patrol to the spot the player clicked and instead of using "after existing orders" you use "replacing existing orders"
b) Check if the clicked location is within a circle region around the triggering unit and if not, don't give the command or whatever
a) I have events= "Any Unit is issued an order to patrol", conditions making sure it's one of the 3 mobile towers, but in actions, what would i put? "Issue order" only gives the Hold Position option out of all the move types. I see the replace existing orders thing youre talking about, but then what action would it be?
b) how would i do this? I think i'd set up a variable for "Patrol Distance" as an integer and then say condition "Patrol Dristance > (more than i want the distance to me)". I'm still new to the whole variable/constant thing. Do i need to attatch the variable to anything so it'll register or..?
Also, for the events on this too, what would i do?
Disable the (Unit ability (Count of orders on (Triggering unit))) ability for (Tryiggering Unit)?
a)[...] "Issue order" only gives the Hold Position option out of all the move types. I see the replace existing orders thing youre talking about, but then what action would it be?
You only see "Hold Position" because but default "Issue order with no target" is selected when you use the Issue Order action. You need to click the parenthesis right before (Ability Command) and change to "Order Targeting Point".
b) how would i do this? I think i'd set up a variable for "Patrol Distance" as an integer and then say condition "Patrol Dristance > (more than i want the distance to me)". I'm still new to the whole variable/constant thing. Do i need to attatch the variable to anything so it'll register or..? Also, for the events on this too, what would i do?
You can use something like:
If Distance between (Target Point for Triggering Order) and (Position of Triggering Unit)>Patrol Distance
Then ...
a) okay so i changed it to Order Targeting Point, but the values only offer points obviously (the only points i have are for pathing/spawning/killing at end of path), so in Functions, there was one i thought migh work.. "Unit Rally Point Target Point" because the patrolling waypoints seem to work similar to rally points, or also "Target Point of Order" or "Reflected Point" look promissing too. Which do i need to use?
b) would this be correct then?:
Actions
-If Then Else
() If
()() (Distance between (Target point for (Triggering order)) and (Position of (Triggering Unit))) > 10.0
() Then
()() Unit - Order (Triggering unit) to (Stop) (Replace Existing Orders)
()() UI - Display "You can't patrol that far! (Max range 10)" and play Hellion_Help for (Player group((Owner of (Triggering unit)))) [i used error message]
would that work?
EDIT: B) works like a charm :) I had it to BEFORE existing orders and it would move for a little then stop, but i changed to REPLACE and now it doesnt move at all. Thank you! But now i have another problem lol:
c) So my mobile tower is a hellion if you havent seen. Basically i want it to be told to patrol once (i'm gonna hide the button/ability so they cant keep moving it) and it attack waves WHILE it moves back and forth. However since units can only do 1 ability at a time, attacking STOPS the patrolling. How do i allow the unit to patrol and attack simultaneously?
Actions
-If Then Else
() If
()() (Distance between (Target point for (Triggering order)) and (Position of (Triggering Unit))) > 10.0
() Then
()() Unit - Order (Triggering unit) to (Stop) (Replace Existing Orders)
()() UI - Display "You can't patrol that far! (Max range 10)" and play Hellion_Help for (Player group((Owner of (Triggering unit)))) [i used error message]
It should probably be
ifdistance<10.0
, not the other way around.
Quote:
c) So my mobile tower is a hellion if you havent seen. Basically i want it to be told to patrol once (i'm gonna hide the button/ability so they cant keep moving it) and it attack waves WHILE it moves back and forth. However since units can only do 1 ability at a time, attacking STOPS the patrolling. How do i allow the unit to patrol and attack simultaneously?
You need to make the weapon a turret. Say, something like the mothership has a turret. Then change deceleration to 0 or something - not sure about that. I'm pretty sure it has to be a turret, however.
<</code>>
b) whoa! Yeah the > vs < was a mistake on my part but i mustve found a bug, cuz the way i did it (wrong) is actually working correctly, and putting it te right way (like you said) actually makes it work the way you would THINK my way does! This is wierd xD I'll upload this version tomorrow night if you wanna take a look then (trigger would be Towers > Patrol limitations > limit distance)
c) how do you make a (damaging) weapon into a turret??
By default, a unit can select up to seven spots to go to when patrolling ("waypoints"), + it' starting location. How do you limit this to only the start location and ONE waypoint?
And how do you limit the DISTANCE between 2 waypoints?
I think it would work if you use the "Unit is Issued Order" event. Everytime the unit is issued a patrol command, you can:
a) Override old patrol command by issuing the order to patrol to the spot the player clicked and instead of using "after existing orders" you use "replacing existing orders"
b) Check if the clicked location is within a circle region around the triggering unit and if not, don't give the command or whatever
Greetz
Error Ash
a) I have events= "Any Unit is issued an order to patrol", conditions making sure it's one of the 3 mobile towers, but in actions, what would i put? "Issue order" only gives the Hold Position option out of all the move types. I see the replace existing orders thing youre talking about, but then what action would it be?
b) how would i do this? I think i'd set up a variable for "Patrol Distance" as an integer and then say condition "Patrol Dristance > (more than i want the distance to me)". I'm still new to the whole variable/constant thing. Do i need to attatch the variable to anything so it'll register or..? Also, for the events on this too, what would i do?
Disable the (Unit ability (Count of orders on (Triggering unit))) ability for (Tryiggering Unit)?
You only see "Hold Position" because but default "Issue order with no target" is selected when you use the Issue Order action. You need to click the parenthesis right before (Ability Command) and change to "Order Targeting Point".
You can use something like:
If Distance between (Target Point for Triggering Order) and (Position of Triggering Unit)>Patrol Distance
Then ...
a) okay so i changed it to Order Targeting Point, but the values only offer points obviously (the only points i have are for pathing/spawning/killing at end of path), so in Functions, there was one i thought migh work.. "Unit Rally Point Target Point" because the patrolling waypoints seem to work similar to rally points, or also "Target Point of Order" or "Reflected Point" look promissing too. Which do i need to use?
b) would this be correct then?:
Actions
-If Then Else
() If
()() (Distance between (Target point for (Triggering order)) and (Position of (Triggering Unit))) > 10.0
() Then
()() Unit - Order (Triggering unit) to (Stop) (Replace Existing Orders)
()() UI - Display "You can't patrol that far! (Max range 10)" and play Hellion_Help for (Player group((Owner of (Triggering unit)))) [i used error message]
would that work?
EDIT: B) works like a charm :) I had it to BEFORE existing orders and it would move for a little then stop, but i changed to REPLACE and now it doesnt move at all. Thank you! But now i have another problem lol:
c) So my mobile tower is a hellion if you havent seen. Basically i want it to be told to patrol once (i'm gonna hide the button/ability so they cant keep moving it) and it attack waves WHILE it moves back and forth. However since units can only do 1 ability at a time, attacking STOPS the patrolling. How do i allow the unit to patrol and attack simultaneously?
It should probably be
, not the other way around.
You need to make the weapon a turret. Say, something like the mothership has a turret. Then change deceleration to 0 or something - not sure about that. I'm pretty sure it has to be a turret, however. <</code>>
a) bump
b) whoa! Yeah the > vs < was a mistake on my part but i mustve found a bug, cuz the way i did it (wrong) is actually working correctly, and putting it te right way (like you said) actually makes it work the way you would THINK my way does! This is wierd xD I'll upload this version tomorrow night if you wanna take a look then (trigger would be Towers > Patrol limitations > limit distance)
c) how do you make a (damaging) weapon into a turret??
bump