HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Turning off auto attack?

08-01-2004, 08:22 PM#1
[niro]
I'm not sure if this has been asked before, and if it has, i couldn't find it.


Is there anyway to turn off a units auto attack? Like in a video game, you have to order the unit to attack, it doesn't auto attack, I tried making the aquostion(spelling?) range 0, but that didn't work.

How do you turn off auto attack? With or without triggers it doesn't matter.
08-01-2004, 10:33 PM#2
Panto
Um, setting the Acquisition Range to 0.00 should have worked. Double-check your settings on that.

Otherwise, you might be able to have the unit possess another dummy ability that calls itself Attack, and when the players uses that ability, it gives the unit Attack and orders it to attack the target of the dummy ability, but that'd be like hunting cows in Alaska.
08-01-2004, 11:26 PM#3
Mythmon
setting the acusition range to 0 woont do any thing because if thats lower than the actual range the unti range will effectively be the acuisition range, what will work is setting the unit classifaction to include worker, worker will not attack unless ordered, bu they also wonnt attack back, they just run, but you can turn off fleeing too
08-01-2004, 11:54 PM#4
[niro]
Quote:
Originally Posted by Mythmon
setting the acusition range to 0 woont do any thing because if thats lower than the actual range the unti range will effectively be the acuisition range, what will work is setting the unit classifaction to include worker, worker will not attack unless ordered, bu they also wonnt attack back, they just run, but you can turn off fleeing too


I thought of that, then i have the problem of the idle worker icon crap.
08-02-2004, 07:33 PM#5
Pyrus
I beleive that could be turned off in the Object Editor.
08-02-2004, 07:40 PM#6
Heptameron
Quote:
Originally Posted by Pyrus
I beleive that could be turned off in the Object Editor.
Unfortunately, it can't.

Does setting the acquisition range work in triggers?
08-02-2004, 08:14 PM#7
Shimrra
Is it possible to import a worker icon that was an alpha-channel set to a point that the icon is transparent?

Alternately, you could make you're units be neutral towards enemy units. Then make two trigger; one that says if a unit is attacked, order the attacking unit to attacker the attacking unit and another that says if a unit is inssued an order targeting a unit with the order being smart, then order the ordered unit to attack the target of the issued order. Also, make sure that all of your abilities effect neutral units.
08-02-2004, 08:33 PM#8
[niro]
Quote:
Originally Posted by Shimrra
Is it possible to import a worker icon that was an alpha-channel set to a point that the icon is transparent?

Alternately, you could make you're units be neutral towards enemy units. Then make two trigger; one that says if a unit is attacked, order the attacking unit to attacker the attacking unit and another that says if a unit is inssued an order targeting a unit with the order being smart, then order the ordered unit to attack the target of the issued order. Also, make sure that all of your abilities effect neutral units.


Ah shimrra you genius, thanks alot!
08-02-2004, 09:04 PM#9
Anitarf
Just one question: does killing neutral units give exp/bounty? If not, you'll have to trigger that (not really a big deal).
08-02-2004, 09:07 PM#10
Shimrra
What effects bounty is the player, not the alliance status. You just have to make sure that bounty is enable for the player who is set to neutral, and it'll work perfectly.
08-03-2004, 08:07 PM#11
RaeVanMorlock
Quote:
Originally Posted by Mythmon
setting the acusition range to 0 woont do any thing because if thats lower than the actual range the unti range will effectively be the acuisition range, what will work is setting the unit classifaction to include worker, worker will not attack unless ordered, bu they also wonnt attack back, they just run, but you can turn off fleeing too

Is this something new? It used to be an issue that a unit could have 1600 range, but with only 600 acquisition range, they wouldn't auto-attack until someone came into that 600 range.



Quote:
Originally Posted by Shimrra
Alternately, you could make you're units be neutral towards enemy units. Then make two trigger; one that says if a unit is attacked, order the attacking unit to attacker the attacking unit and another that says if a unit is inssued an order targeting a unit with the order being smart, then order the ordered unit to attack the target of the issued order. Also, make sure that all of your abilities effect neutral units.

If you attacked the attacking unit, then you'd be spinning in circles with multiple units attacking you. You'd need to include a conditional to make sure that you're not doing something else.

For simulating "smart" auto-attacks, you'd need to check for when an enemy unit becomes visible within the acquisition range and store the point of the "smart" to a variable. Then once the the fight is done, assuming no other directed orders are given, return moving to the previous point.



Quote:
Originally Posted by Anitarf
Just one question: does killing neutral units give exp/bounty? If not, you'll have to trigger that (not really a big deal).

Quote:
Originally Posted by Shimrra
What effects bounty is the player, not the alliance status. You just have to make sure that bounty is enable for the player who is set to neutral, and it'll work perfectly.

Turn enable bounty for a player, the trigger:
Player - Turn Player Flag On/Off - Turn Gives bounty On for (Player)

By enabling bounty, any time one of the specified player's units dies to an enemy unit, the enemy player will receive the bounty for it. So the alliance status does have some effect on bounty--you're not rewarded for killing your allies.