| 05-12-2004, 10:55 PM | #1 |
how do I make it so that a unit can't attack enemies, but can attack allies? |
| 05-12-2004, 10:58 PM | #2 |
event: elapsed time is 0.01 action: set alliance for <player> to make <player2> enemy <vice versa> |
| 05-13-2004, 02:25 AM | #3 |
Alliances don't prevent you from being able to attack your allies. Not to mention that the player's own units are allied, in a sense, too. MeuhAteTree, I assume that you've messed around with the allowed targets for the unit's attacks? Tell us what you've tried so far. For reference, I don't think you'll ever make it so that a unit will automatically attack allied units around it without elaborate and unseemly triggers. |
| 05-13-2004, 12:56 PM | #4 | |
Quote:
I have been messing around with a lot of the 'what it can and what it can't attack'. I have tried most of what to allow, and played around for hours trying to make this work. its an rpg, so you just use a hero. on the hero, the first attack allows enemy, non-hero and I need to be able to have the second attack not necessarily auto attack allies, that would be useless, but to just be able not to target enemies at all. |
| 05-14-2004, 10:23 PM | #5 |
So does anyone have an answer? I am really confuzzled with the problem. I thought of also trying what it can attack such as ancients, flying, and stuff, but I found out that the change classification (trigger) doesn't quite work the way I hoped it did. Or, Or OR... umm, how do I make it so that units don't share experience with their allies in game when they are within enough range to regularily get exp. I have tried the couple of triggers that say to stop sharing experience with players.. but I must be doing something wrong, because those didn't quite work out for me either. If someone has an answer to either of these, please tell me. |
| 05-14-2004, 10:43 PM | #6 |
Triggers, eh? I'll move ya. |
| 05-14-2004, 11:40 PM | #7 |
you'll move me? AHHH.. triggers or units or AHHH.. this whole thing is just annoying... I have a haedake now |
| 05-15-2004, 02:44 AM | #8 |
Your going to have to find the condition that says "is enimies of" or something to the similar extent. Ill show you the rest, though. Events : A unit is attacked Conditions: owner of attacking unit enimies of unit being attacked Actions: Order attacking unit to stop. Of course this wouldnt stop a really really determined player who tried to attack like 50 times. But other than that it should work fine (provided you find the "is enimies of"...) |
| 05-15-2004, 02:53 AM | #9 |
If you want a unit to not be able to kill any allied units, then try one of these techniques:
Any of these would ensure that the Hero couldn't kill the allied units. The first makes it so no one can attack the unit, but it is completly impervious to any assault. The second one makes it vulnerable, but Divine Armor only let's a unit take 1 damage per hit from any non-chaos damage dealing units. The third makes it, for all intents and purposes, invulnerable to the Hero, not enemies or spells, because every time the Hero attacks it, it's health will be set back to 100%. You could also create a trigger that says A unit begins casting a spell; Casting unit equal to the Hero; order casting unit to stop. |
| 05-15-2004, 04:16 AM | #10 |
You got it backwards. I want allies to be ABLE to attacking allied, hero units. I want them NOT able to attack enemies and enemy heroes. |
| 05-15-2004, 06:34 AM | #11 |
AHG, I feel super stupid now. I made one of those supersmall mistakes which kinda screwed everything up. I was once before using the aspect of alliance triggers for allowing experience sharing, but I made the really extremely stupid mistake of forgetting to make that at map initialization the aspect of alliance for all players of experience sharing is set to off. hehe.... I feel REALLY dumb now. |
| 05-15-2004, 08:58 AM | #12 |
AHG!!!! This reallly makes me angry: K, I tested the trigger by: I made a new map, gave red a hero, and blue a hero. near them I put a nuetral creep. Red and blue were allies, but I set a map initialize trigger to turn experience sharing off. when red's hero killed the creep, blue gained no experience: Success. Thats when I posted my last post. In my map, I applied that trigger to everything, and at the beginning, set it so that experience sharing was off, but they heros are still sharing xp. Is it because of the hero selection > gives your a hero trigger? I really would like to have this group thing work, so will someone please help me out?? I would really appreciate it if you could! (also I tried: when a unit enters region (spawning region of heros, for testing only) to run the aspect of alliance: exerience sharing off trigger. That didn't work either... I am just very confuzzled on why this won't work.) If with the hero selection it won't work should I give a time limit for the players to select their heros and load their heros if they need to, and when the time limit expires run the aspect of alliance trigger? or would that not work either?) |
| 05-15-2004, 02:48 PM | #13 |
Per haps you could set their alliance to be neutral with each other. I don't believe Neutral shares anything with those of which they are neutral to. |
