HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

What's the best way to disable auto-attack in-game?

08-01-2007, 10:46 PM#1
Lordy
Hey, title says it all =)
I don't want to the remove the unit's attack. I only want to remove the unit's auto-attack. No side-effects please. The auto-attack has to be readded later on. Thanks for replying =),
Remy.
08-01-2007, 11:20 PM#2
Nubcookie
dammit I didn't read, it needs to be readded.
08-01-2007, 11:25 PM#3
MaD[Lion]
peons dont autoattack, so seems like u need 2 version of this unit
08-01-2007, 11:52 PM#4
Pyrogasm
Trigger:
Unit - Add the classification Worker to (TheUnitYouWantToAffect)
Unit - Remove the classification Worker from (TheUnitYouWantToAffect)
The first will make it not-auto attack, the second will make it auto-attack again.
08-02-2007, 12:00 AM#5
Lordy
Ah thanks, you didn't have to do it in GUI for me =)
There is a catch though right: when the unit is idlen an idle peasant icon will display in the lower left corner of the screen?
08-02-2007, 12:02 AM#6
Pyrogasm
Maybe, I'm not entirely sure.
08-02-2007, 12:14 AM#7
Beardo
Quote:
Originally Posted by Lordy
Ah thanks, you didn't have to do it in GUI for me =)
There is a catch though right: when the unit is idlen an idle peasant icon will display in the lower left corner of the screen?

cant you disable that?
08-02-2007, 04:46 AM#8
DioD
no icon for class given by triggers
08-02-2007, 03:54 PM#9
fps-doug
yea as long as you add it after the game starts there will be no icon. If you give him worker classification in the object editor though he will have a worker icon.
08-02-2007, 08:00 PM#10
NightBreeze
It works, thanks :)

Edit: Oh, I thought I was on lordy's acc. Same project, him and me
08-03-2007, 03:45 AM#11
Beardo
ps though, worker classification gives the unit some unwanted behavior

most notably when youre just standing casting spells on a mob while youre getting attacked your unit will be periodically ordered to move away instead of attacking. its the only reason I dont do it.
08-03-2007, 09:04 AM#12
Anitarf
Quote:
Originally Posted by Beardo
ps though, worker classification gives the unit some unwanted behavior

most notably when youre just standing casting spells on a mob while youre getting attacked your unit will be periodically ordered to move away instead of attacking. its the only reason I dont do it.
Set the "can flee" unit stat to false. However, in that case the unit also won't flee even when auto-attacking is enabled for it and it is attacked by a unit it can't hit back, like an air unit.
08-03-2007, 10:59 AM#13
NightBreeze
Yeah I figured that would happen, but it's no problem to turn off "can flee". Thanks for the help