| 02-12-2003, 10:38 PM | #1 |
Im makeing a map and i want a dwarf rifleman to fire over and over again.... but not automataicly. Ive set his cooldown to 0.01 but i want the user to select the rifle man and right click on an enemy to fire once and only once. If the use right clicks on the enemy over and over again then the rifleman will fire over and over again. Ive tryed seting the riflemans unit classifacaton to worker but that dident help at all. He just fires atanything inrang after attacking a unit. And ive tryed the trigger : event: player 10 (enemy) is attacked Action: Order attacking unit to stop. But after he stops he will start attacking again over and over. so how can i fix this hole issue? |
| 02-12-2003, 10:48 PM | #2 |
so u want him to attack when u press 'a' and then click on the enemy unit? |
| 02-12-2003, 11:12 PM | #3 |
yes basicly the same thing as right clicking on an enemy. But when he attacks the enemy i dont want him to keep attacking. I want him to attack once and only once. But if the player keeps issueing the command to attack over and over again then he will attakd over and over again. Example................................ If I right click on an zombie(same as pressing "A" then clicking on him) the rifleman would attack him once. If i right click him twice then the rifleman will attack twice. If i right click him repeatuly then then rifle man will attack repeatuly. Ive set the cooldown for the rifleman to 0.01 so that when i right click on an enemy he will attack him instantly but the problem is i cant get him to stop autoengageing enemys inrang or as i said above to stop attacking the unit till it dies. |
| 02-12-2003, 11:31 PM | #4 |
You might try this: Set the Rifleman's attack to do no damage and have no graphics. Make an invisible, ethereal unit that is always on top of the Rifleman, and has a Suicidal ranged attack with Rifleman graphics. Events - player gives order targeting a unit Conditions - order = "attack" or "smart", Target Unit belongs to an enemy of Ordered Unit. Actions - Order Suicidal Invisible Guy to attack Target Unit. Create new Suicidal Invisible Guy on top of Ordered Unit, set whatever variables you need to the new Suicidal Invisible Guy. Not sure if this will work, but you might give it a try. |
| 02-12-2003, 11:53 PM | #5 |
Well... you could just give it endurance aura and gloves of haste abilities. Those would make it attack alot faster than normally, which is what you want. And you could do Unit issued order targeting unit Order=smart or Order=attack Wait 0.01 seconds issue order stop to triggering unit |
