disable auto attack

Status
Not open for further replies.
Level 16
Joined
Aug 20, 2009
Messages
1,554
hello, i tried disabling auto attack, but it never work.

this unit is a normal unit, but i want to disable auto attack when it cast an immolation spell, (Disable it from auto acquiring target).
:\
well, i tried using specific order ids to disable, it fail, i tried silencing the unit (only for ranged and melee attack) it fails, i tried setting acqusition range to 1 by trigger, it fails.

help me!
 
Level 16
Joined
Aug 20, 2009
Messages
1,554
no, it still auto acquires target, and its really making me go nuts.

i want it to stop "Auto - Acquiring target" (facing the enemy. my unit is ranged.)

i have really removed the attacked, but it still are going to the units. i want them to stay, like how peasant does, even though it has attack, it don't go auto attacking.

i just want them to stop "facing" the enemy. i told them to stop when they acquire target, but they still does it, even though i silenced the attack.

@Chizume

any will do, as long as it dont go facing enemy unit when immolation is on.
 
Level 16
Joined
Aug 20, 2009
Messages
1,554
ok, i want it to be like peasant, it can attack, but they never attack. but i dont want it to use any classification. i just dont want them to face some unit. automatically when imolation is on.

using stop on them makes it worse, somehow its crazy. they click more than what trigger could prevent, they still face the unit even though i told em to stop when they acquire a target. using a trig
 
Level 37
Joined
Mar 6, 2006
Messages
9,243

  • Untitled Trigger 026
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(immolation))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in group) Equal to True
        • Then - Actions
        • Else - Actions
          • Unit Group - Add (Triggering unit) to group
          • Trigger - Add to Untitled Trigger 035 <gen> the event (Unit - (Triggering unit) Acquires a target)
  • Untitled Trigger 035
    • Events
    • Conditions
      • ((Triggering unit) is in group) Equal to True
    • Actions
      • Countdown Timer - Start Timer1 as a One-shot timer that will expire in 0.00 seconds
      • Unit Group - Add (Triggering unit) to Delayed_Move
  • Untitled Trigger 039
    • Events
      • Time - Timer1 expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Delayed_Move and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Stop
          • Unit Group - Remove (Picked unit) from Delayed_Move


Remove from group when unimmolation. The unit gets ordered to stop a lot when nearby enemies, but maybe this helps.
 
Level 16
Joined
Aug 20, 2009
Messages
1,554
...lol, this unit is actually immovable when in immolation,

and we need to manually turn the facing, it works well when there is no enemy, i set it with setUnitX and setUnitY, so that it would still turn manually when we command it to move to that direction, but for some reason, if there is an enemy, it will face that unit, and make my manual commands to be impossible. (if there is enemy on the left, it automatically turns to left, no matter what, when i command it to the right, it won't turn.) so i want this auto-targetting to be eliminated.

your method may work, but, it makes my unit don't turn around when i command it manually. to move at that direction.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Method 1:
Give the unit Wind Walk and order it to use it. Make the duration 0 so it's permanent. Disable backstab damage. Set the unit data field can flee to false. Give every unit True Sight.

Drawbacks: The unit will be transparent and you can't use invisibility in your map.

Method 2:
When you order the unit to face angle, store the angle. When the unit acquires a target, order it to face the stored angle, use the system I posted to give the turn oder that small delay. Didn't test this though.
 
Level 16
Joined
Aug 20, 2009
Messages
1,554
if no one could make it here,
then i will try looking my own way,
else i will just give up making it.

nobody seems to be so motivated about this. :\
how is method 1 supposed to work?

giving the unit windwalk ability will look so bad, since the player can press it.
and it can be seen in the icon list.

method 2 failed to work.

i give up, if someone else has an idea how to do this, please post an answer.
i will be looking for the replies here, thx.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
but i dont want it to use any classification

Why is that? It does not even show the idling worker icon when you add the peon classification via triggers. And for everything else you can just invent a new classification by putting natural peons upon creation in groups or the like or there is even unittype check for the object editor type.
 
Level 16
Joined
Aug 20, 2009
Messages
1,554
does adding them as a peon classification via trigger can make them to not auto aquiring targets?

Edit : i tested, it does not.

any one knows why peons doesn't attack back?.

Edit : anyways guys, i found a way to disable auto acquiring target while we command them to face a direction, and only follow what we command, it got something related to point targetting skills.
i added a point targetting skills everytime the unit is told to move at a direction, and command it to use it to that direction, than remove it immediately.

it works.
 
Status
Not open for further replies.
Top