| 07-04-2004, 02:23 PM | #1 |
Hi guys! Is there any way to stop your unit from auto attacking your enemies? Abilities, triggers, anything! Except items, cause then the player would be able to drop it. I thought about basing it on Shadowmeld, but then they would be invisible to, and it wouldnt work when they move. Any ideas? |
| 07-04-2004, 02:29 PM | #2 |
The only way your going to be able to do that is to make it so the enemies aren't enemies. By use of triggers, you can set alliances between forces. Set it so you are neutral towards the enemy and they are hostile towards you. I believe the trigger is "Player - Set Alliance". |
| 07-04-2004, 03:07 PM | #3 |
Alternatively you could intercept any order the unit attempts to carry out with a "issue order- stop" action. |
| 07-04-2004, 03:24 PM | #4 |
Event: Unit - A unit is attacked Action: Unit - issue order for (attacking unit) with no target (stop) That might work, but if you have a lot of units around the place it would fire a helluva lot, which could lag the crap out of your map. |
| 07-04-2004, 03:29 PM | #5 |
Nah it doesn't. I've implemented these kind of triggers on a pretty large scale before. |
| 07-04-2004, 04:28 PM | #6 |
I know i can ally them, but then i would have to click 'a' to attack, and i dont want that |
| 07-04-2004, 04:52 PM | #7 |
You could also set the "Aim collection range" ( dunno it in the english editor i have the german one) to 0. Then your Unit wont attack other Units on their own. In German it's: Zielerfassungs-Reichweite Try this. cu BladeKiller --------------------------------------- Please give me Reputation points! |
| 07-04-2004, 05:14 PM | #8 |
BladeKiller is correct, in the English editor it's called Accuistion Range (the spelling may be incorrect). If you change it to 0, the unit's won't attack anything, unless attacked or when ordered to attack. |
| 07-04-2004, 05:22 PM | #9 |
I believe (not certain) that if you set the unit type to peasant it will no longer auto aquire, but i dont know any other side effects this will have, so i think milk and blades ideas would be best. This would jsut be faster if it worked. |
| 07-04-2004, 05:22 PM | #10 | |
Quote:
Set Acquisition Range = 0. Prolly what BladeKiller is talking about. However this will create a rare occuring bug that happens when acquisition range is smaller than attack range. You'll, once in a while, see the attacking unit keep playing its walk animation while it is attacking! Ally enemy will also work with right-clicking attack feature. Put a trigger (event: unit issued order targeting object) and check if "smart" order, then issue an attack order... |
| 07-04-2004, 07:12 PM | #11 |
i have changed the acqusition range to 0, but my unit still attack automatic! |
| 07-04-2004, 08:05 PM | #12 | ||
Quote:
This will work, but there are also some unwanted side effects... - You'll have that annoying 'Idle woker' icon all the time - The unit will run when attacked Quote:
This will work most of the time, but a really determined player can still get attacks off, plus, if the unit is just walking about and it sees an enemy, then it go to attack. As per the trigger, it will stop, but there's nothing to make it keep walking, thus creating a fairly annoying problem... |
| 07-04-2004, 11:15 PM | #13 |
So there is really no way to do it, that wont have any side effects? |
| 07-04-2004, 11:46 PM | #14 |
Oh you can. You can build on the itnercepting orders method so that your units store their orders. That way they won't stop. But of course its a fair bit of work. One thing you could do is temporarily morph the unit into another almost-the-same unit but with the only targets allowed for its attack "bridge". |
| 07-05-2004, 12:32 AM | #15 |
Sounds pretty hard to do, for someone like me. I have never done that before |
