| 06-28-2004, 05:11 AM | #1 |
Hey all, I need your help, I made this triggered spell, and I want to add damage (using trigger) when the level is increased. I am sure I have to play with the "variable", but I am not sure of what I must do. Can anyone help? |
| 06-28-2004, 05:29 AM | #2 |
Your solution would be the function "integer - unit - level of ability for unit". You can then use this value in a function (like decrease life of target unit by (levelofability*100)), but remember that the problem here is that if the trigger kills the unit, no-one gets any bounty/experience. A more functional method is to use a dummy caster and get the bonus damage effect with a spell, in this case, you must use an ability-variable array where you store all the versions of the bonus-damage spell at map initialization. Then all you do is give the appropriate ability to the dummy caster by giving him "damageAbilityVariable(Level of ability for casting unit)" and ordering him to cast it on the target of the original spell. Just in case you don't know, dummy casters are invisible (use a model like "zone indicator"), unselectable and untargetable (give them the ability locust (aloc)), cast spells instantly (set the "art-cast point" in the object editor to 0), and are removed from the game shortly after they do the job they were created for (achieve this either by giving them fast negative life regeneration, or by giving them an expiration timer after you create them). They are used whenever you need additional effects on your spells, for example a lightning bolt that also purges the target. |
| 06-28-2004, 05:32 AM | #3 | |
Quote:
I think that would work, I think I should try. Thanks for the quick answer. |
