HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Casting hex on units

05-31-2005, 12:51 PM#1
hypern
Well, im having trouble with this little trigger. Hope someone would help out a little here :)

Let's say im attacking my own base with a frenly unit and i wan him to be casted hex for 3 seconds . To prevent him from destroying his own base .
Anybody can explain in triggers ? thanks .
05-31-2005, 01:05 PM#2
divine_peon
hmm, never tried it but i guess you can add a buff called hex on the attacking unit.
05-31-2005, 02:12 PM#3
shadow1500
You will have to create a dummy unit to cast hex on the attacking unit.
05-31-2005, 11:08 PM#4
Guest
Quote:
Originally Posted by hypern
Well, im having trouble with this little trigger. Hope someone would help out a little here :)

Let's say im attacking my own base with a frenly unit and i wan him to be casted hex for 3 seconds . To prevent him from destroying his own base .
Anybody can explain in triggers ? thanks .
Well actually, I did something simular (exept the unit isn't hexed)
This trigger, all it will do, is make it so that your unit will infact, never attack the target once.
Code:
Debug
    Events
        Unit - Castle 0001 <gen> Is attacked
    Conditions
        (Owner of (Attacking unit)) Not equal to Player 9 (Gray)
    Actions
        Unit - Order (Attacking unit) to Attack-Move To (Player 1 (Red) start location)
Now this is the exact tirgxger from my map, it work perfectly. Here are just a few notes, because this trigger will not directly work for you:
1) Castle 0001 <gen> obviously will have to be changed to your base
2) Player 9 is the enemy in my map, therefore your condition will have a different player most likely
3) Now I'm assuming the player start location IF NOT well then, create a region nearby, that way when he/she trys attacking the base they will move to that location (Note: the attack move, just incase there are enemies)

Try that ~
06-01-2005, 01:42 PM#5
Earth-Fury
#1: create a custom hex ability, make it a unit ability. make it last 3 seconts, and make it only able to target friendly heros (and give it the max possible range)
#2: give the home base the edited hex ability

Events:
Unit - A unit is attacked
Conditions:
Boolean - Owner of (Attacked Unit) is an ally of Owner of (Attacking Unit)
Actions:
Order (Home Base) to Orc Shadow Hunter - Hex (Attacking Unit)

that will work for the ENITRE map (well, the range of the hex spell)
06-01-2005, 10:53 PM#6
Guest
Quote:
Originally Posted by Earth-Fury
#1: create a custom hex ability, make it a unit ability. make it last 3 seconts, and make it only able to target friendly heros (and give it the max possible range)
#2: give the home base the edited hex ability

Events:
Unit - A unit is attacked
Conditions:
Boolean - Owner of (Attacked Unit) is an ally of Owner of (Attacking Unit)
Actions:
Order (Home Base) to Orc Shadow Hunter - Hex (Attacking Unit)

that will work for the ENITRE map (well, the range of the hex spell)
Ok, I'm not saying your wrong (because I don't know)
But if it's a custom ability. You can't use "Orc Shadow Hunter - Hex (Attacking Unit)" because that's not a custom ability. Anyways besides that, it's a good way (except u dont need max range, unless another unit in the game has max range)
06-01-2005, 11:52 PM#7
Earth-Fury
yes but what i wrote will stop team killing on the whole map, not just against the home base.

and as long as the hex ability you use is based off hex, then that will work.