| 04-28-2006, 10:47 PM | #1 |
How could I detect before a player attacks an ally? Similar to DotA, thanks. |
| 04-28-2006, 10:56 PM | #2 |
In a nutshell: Unit is attacked, triggering unit is an ally of Owner of(attacking unit) equal to true, order attacking unit to stop. That will prevent allies from attacking each other. |
| 04-29-2006, 01:58 AM | #3 |
Or: E: -A unit is issued an order targeting a unit C: -(Issued order) equal to (Attack) -(Target unit of issued order) equal to (An ally of (Owner of ordered unit)) A: (EXTRA)-Display to all players the text message "(player name of owner of ordered unit)+( has tried to teamkill )+(Name of owner of target unit of issued order)+(.....Bad boy!) -Order (Ordered unit) (Stop) |
| 04-29-2006, 02:27 AM | #4 |
... or you can just make it in targets allowed "enemies" |
| 04-29-2006, 06:32 AM | #5 | |
Quote:
That doesn't stop you being able to attack allies. Perosnally, I prefer Exilus' version, without the message and ordering the unit to move/attackmove to the position of the target of the order. |
| 04-29-2006, 07:49 AM | #6 |
The best thing is to order the unit to attack move into the position of the targeted ally, so instead of just stopping you will try and search for attacking enemies around the target. |
| 04-29-2006, 08:32 AM | #7 |
Or you can just change the attacks of all heroes/mercs to not be able to attack allies. More professional, less triggers, and generally a better solution. |
| 04-29-2006, 08:36 AM | #8 | ||
Quote:
Quote:
|
| 04-29-2006, 08:52 AM | #9 |
exilus's solution is probably the best to prevent click attacking you cant make that only target enemies. though why he didnt use trigger tags I don't know. I say give the guy some rep for helping ye out. |
| 04-29-2006, 08:58 AM | #10 | |
Quote:
I'm pretty sure that it does, though I can't check it at the moment. Someone else check it, because I'm sure that it does. |
| 04-29-2006, 09:35 AM | #11 |
Just tried it out. Added the 'Enemy' tag to the attack field and it didn't change a thing. |
| 04-29-2006, 09:53 AM | #12 |
What copy and paste the raw data for the attack field. |
| 04-29-2006, 10:02 AM | #13 |
Just believe the man already. Test it yourself. Adding "Enemies" to the field does NOT work. |
| 04-29-2006, 10:02 AM | #14 |
debris,enemies,ground,item,structure,ward That is the targets allowed field. (Footman and added enemies) |
| 04-29-2006, 10:08 AM | #15 | |
Quote:
First, I already said that I cannot test it. Secondly, I want to see if I can work out why it doesn't work. I'm guessing it may be because ground overrides it, and allows it to attack all ground. So if you don't have any air units, it might be worth trying it without the ground there. |
