| 05-22-2004, 07:17 PM | #1 |
I'm trying to create an ability called "White Arrow" that has a 15% chance to strike an enemy undead unit with Holy Light. Here's the trigger I'm using: Code:
White Arrow Level 1
Events
Unit - A unit Is attacked
Conditions
((Attacked unit) is Undead) Equal to True
((Attacked unit) has buff White Arrow ) Equal to True
(Level of White Arrow (Poison) for (Attacking unit)) Equal to 1
Actions
Set WhiteArrowChance = (Random real number between 1.00 and 100.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WhiteArrowChance Less than or equal to 15.00
Then - Actions
Unit - Create 1 Light Dummy (Level 1) for (Owner of (Attacking unit)) at (Center of (Playable map area)) facing Default building facing degrees
Animation - Change (Last created unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
Unit - Order (Last created unit) to Human Paladin - Holy Light (Attacked unit)
Unit - Remove (Last created unit) from the game
Else - Actions
Do nothingThe way I have it set up, it requires the unit to have the White Arrow buff before it can be hit by the Holy Light. Here's my problem: I've tried basing the spell off of every autocast arrow spell in the frickin' game, and none of them work. -Black Arrow works correctly because it gives them the buff, and the spell has worked, but it only Lights on kill hits, and never on Heroes, because of Black Arrow's nature. -Searing Arrows, for whatever reason, won't give the unit any buffs, even if I add them to the Buff list. -Frost and the recently activated autocast Poison arrows also won't give the units the buff, and instead gives them either the Frost or Poison buff, even if I delete them from the list. If you want to get a closer look, I put the map up for download >HERE.< |
| 05-22-2004, 07:36 PM | #2 |
Why dont you just make an ability that does nothing at all and just cast that trigger every time your unit attacks? You could simulate mana drain by subtracting mana every time the unit attacks, although turning it off might be a hindrance. Anyway, if you dont know how to do something, just ask. |
