| 02-13-2004, 12:42 PM | #1 |
in my map i want the units to not attack the enemy unless the player right click on it. how do i do this? Also he have to right click every time he wants to attack |
| 02-13-2004, 12:49 PM | #2 |
hmm, actually, that might be easy as hell. I'd guess that a simple trigger with event: "a unit is attacked", order attacking unit to stop. Then just, hmm, edit all the units to have aquire range at like 0 or sumtin (i'm not totally sure if the unit will attack at the players order though :/...) But you can try this Hope this helps Cubasis |
| 02-13-2004, 01:47 PM | #3 |
setting aquire range at 0 might work, but the trigger with event - unit under attacked isn't really effective. the unit had be be attacked, then it will stop, then might goes back attacking again. I actually wanted to do a spy skill for one of the hero in my map, but sadly, I posted question about unit not attacking the hero under the effect of the spell, and they all said, its impossible. |
| 02-13-2004, 03:41 PM | #4 |
well, this is possible, that's for sure, The problem is if it's doable without needing extensive trigger (and JASS) work. I hoped Setting the aquire range would make the unit not attack-at sight (so "stopping" the unit after it attacking would make it lose it's target and not aquire it again due to the aquire range). Other ways to do this is to emulate the attacking and stuff, that's stuff that i can do easily, but it may be hard to implement/code on your own. Cubasis |
| 02-13-2004, 04:32 PM | #5 |
Set the unit type to "Worker" |
| 02-13-2004, 05:03 PM | #6 |
hmm, yes, it's easy to make the unit not attack units on sight.... but then one needs to manually press "a" (attack) and press enemy... He seems to (logically) want to "right" click a enemy to attack it. Now that's emulatable by sensing a move-order and order the unit to attack it "once" instead....but then the targetting error for the player would still be "green" |
| 02-13-2004, 05:14 PM | #7 |
Uhhh? My way works. Try it, peasants have the "Worker" type. If you make a peasant and a gnoll or something and then select the peasant and right click on the gnoll he will attack it. |
| 02-13-2004, 06:38 PM | #8 | |
Quote:
well, i mentioned it that its impossible for my spell not his. =P Giving the least priority for the unit will make it not attack the one with higher priority unless ordered to. (least to high i think or other way round). Worker may work too, though i not sure about the icon for idle worker, if it does appear too. So i still think acquire range is the best solution to your problem. |
| 02-13-2004, 07:37 PM | #9 |
Worker DOES work. Although if it is that much of a problem, just change the icon and the tooltip to something like 'You have a spy hero'. |
| 02-14-2004, 01:10 AM | #10 |
thnk:D |
