| 05-01-2004, 06:01 PM | #1 |
This trigger refuses to work! Yes, the condition works; I myself added Game - Text functions in the "Then," part of the "If/Then/Else" part, and it showed, the math part will just not work! Please help! Code:
Siphoning Spirit
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to (Tauren Spirit Caller) (1) Siphoning Spirit
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Learned skill level) Equal to 1
Then - Actions
Game - Display to (All players) the text: TEST1
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) / 10.00)
Else - Actions |
| 05-01-2004, 06:21 PM | #2 |
I think the problem is with the 'learnig hero' parts. The 'learning hero' event reponse only works with the 'unit learns a skill event'. |
| 05-01-2004, 06:21 PM | #3 |
Try explaining the variables... I can't tell what's wrong, but I see Learning Hero; what is that? Try explaining the variables and what the ability should do. Until then, the best thing I can say is try unit begins casting ability. Sorry I can't help more... |
| 05-01-2004, 06:28 PM | #4 |
The variables are integers... One is set at the beggining of the trigger to the ability level, then a check is ran in the If/Then/Else part, and if the ability is level 1 ("TSW_SiphoningSpirit[(Player number of (Owner of (Learning Hero)))] Equal to 1"), or 2, or 3, or 4, or 5, then the action is ran. The other variable is the damage variable. It sets the life of the target unit to the variable, then later on in the trigger that integer is multiplied by a % (.10, .15, .20, .25, .30) and whatever number results is the damage dealt to the unit. HOWEVER, this does not work. I used the level-variable because the [Learned Skill Level]... function NEVER works. |
| 05-01-2004, 06:31 PM | #5 |
I still don't get the learnig hero. There isn't any learning unit in the event, so why is it there? Maby you can use the integer function 'unit - level of abillity for unit' to check the level of the abillity being cast. |
| 05-01-2004, 06:34 PM | #6 |
Ah! I get where you're coming from! Let me change that and see if it works... 1 second. It still doesn't work! Code:
Siphoning Spirit
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to (Tauren Spirit Caller) (1) Siphoning Spirit
Actions
Set TSW_SiphoningSpirit[(Player number of (Owner of (Casting unit)))] = (Learned skill level)
Set TSW_SiphoningSpiritDamage = (Integer((0.10 x (Life of (Target unit of ability being cast)))))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TSW_SiphoningSpirit[(Player number of (Owner of (Casting unit)))] Equal to 1
Then - Actions
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - (Real(TSW_SiphoningSpiritDamage)))
Else - Actions |
| 05-01-2004, 06:35 PM | #7 |
I started to try and fix that until I realized I can't even follow it. That trigger is a mess. Explain exactly what you are trying to do in each step. Your trigger doesn't work to begin with, due to the obvious error involving learning hero when you're casting an ability, not learning it... As to the .10 life, Set life of (target of ability being cast) = life of (target of ability being cast) / 10 |
| 05-01-2004, 06:49 PM | #8 |
Okay, I added a new Game - Text message and it isn't displaying. Sooo, that means the condition is messed up. I just want it to check for the ability's level, but that never works without creating another trigger with Booleans saying what level it is... and that's just a mess! -Edit, Updated trigger: Code:
Siphoning Spirit
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to (Tauren Spirit Caller) (1) Siphoning Spirit
Actions
Set TSW_SiphoningSpirit[(Player number of (Owner of (Casting unit)))] = (Learned skill level)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Learned skill level) Equal to 1
Then - Actions
Game - Display to (All players) the text: TEST1
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) / 10.00)
Else - Actions |
| 05-01-2004, 06:52 PM | #9 |
Use the integer function 'unit - level of abillity for unit' set the abillity to 'abillity being cast' and the unit to 'triggering unit'. You now have the level of the spell casted. |
| 05-01-2004, 06:58 PM | #10 |
That's the most useful information I've ever gotten. :) Thanks. Now the condition works, and the message shows, but the math still does not want to work. Here's what I have: Code:
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) / 10.00) Code:
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - (0.10 x (Life of (Target unit of ability being cast)))) Neither worked. HELP! |
| 05-01-2004, 07:03 PM | #11 |
try setting the victim of the ability as a variable |
| 05-01-2004, 07:09 PM | #12 |
That doesn't work either. Does anyone think that having the ability based off Finger of Death has anything to do with the problem? |
| 05-01-2004, 07:44 PM | #13 |
Please help. |
| 05-01-2004, 07:54 PM | #14 |
Just put the spell into a map and upload it here. I'll fix it -- this is taking too long. |
| 05-01-2004, 08:10 PM | #15 |
Nevermind, can't attach files to PMs! This hero is for an Aeon of Strife called "Sunken Ruins of Discord". Here's the map! Thanks for helping. |
