| 07-09-2003, 08:53 AM | #1 |
I have a problem with a spell that I can't overcome at all. This is the spell I want to make: An instant bolt (Effect Finger of Death) that deals damage proportionally to the caster's hero attribute intelligence. Problems: I can't put "Int*3" in the damage field of the spell. I resort to triggers, therefore. If I go "Unit casts an ability", I can't make out the target of the spell. If I go "Is issued an order targeting an object" I can't backcheck if it is the spell(there are only strings, spells apparently don't work) and I don't know when the unit actually casts the spell. I don't get anything to work there. I have to combine 2 events in condition form:(. One thought was to have a variable activate itself when a spell is cast and then go with the "Order is issued" way, but the order comes before the casting. My latest idea was to include a "Is in range of unit" condition to the IssuedOrder trigger, with the range being the range of the spell, but if you order it and the unit is not in casting range yet it wouldn't work. 2 questions: Is there ANY way to check if an order is a spell? Does the "Wait" action block all other triggers from working? |
| 07-09-2003, 11:05 AM | #2 |
Do like this: To check which order it is, make the order the same as the spell you base it of (If you base it of BloodLust, for example, choose in the upper line "Orc Shaman - BloodLust" as the order). Then you do the following: First make the spell deal 0 damage. Two triggers Trigger #1: Code:
Events: Unit does an order targeting an object Condition: (Issued order) equals FingerOfDeath (or something) Actions: Set variable FingerUnit = target unit of issued order Code:
Events: Unit starts the effect of an ability Condition: Spell cast equals (YourSpell) Actions: Unit: Set HP of unit (FingerUnit): Subtract HP by (Int of hero) * 3 That should be it! |
| 07-09-2003, 11:04 PM | #3 | |
MEEP MEEP Quote:
What is the string for an order comparison with a spell? I tried out to enter just the raw data of the spell name, but that doesn't work. It was one of the classic hero spells, even... But your two triggers are very similar to what I came up with, which fills me with hope:) edit: however, note that what I came up with doesn't work;) |
| 07-09-2003, 11:08 PM | #4 |
When you create a custom spell, it has an order string field for using it, activating it, or whatever the spell needs for order strings to affect it. So in your custom spell's order string field, give it an order string if it doesn't have one, or use the current one. |
