| 02-11-2006, 09:04 PM | #1 |
The ultimate ability for a hero in my map drains the hero of his mana and deals a fraction of that in damage to all enemy heros on the map and heals all allied heros on the map. Before it wasn't healing the casting hero and I assumed since I was using "Set property" to set the hero's life of "life of hero + Oratio Dominica/#" it was trying to set the hp above the max and just didnt do it since it couldn't. I am trying to heal the units now but it says that there are the errors with that "targetheal" function and it turns off the trigger. Code:
Oratio Dominica Level 1
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Oratio Dominica (Fodder)
(Level of Oratio Dominica (Fodder) for (Casting unit)) Equal to 1
Actions
Game - Display to (All players) for 5.00 seconds the text: |cffffcc00Oratio Do...
Game - Display to (All players) for 5.00 seconds the text: |cffffcc00PATER nos...
Game - Display to (All players) for 5.00 seconds the text: |cffffcc00Amen|r
Set OratioDominica = (Mana of (Casting unit))
Unit - Set mana of (Casting unit) to 0.00
Unit Group - Pick every unit in (Units in (Playable map area)((((Picked unit) is in (All allies of (Owner of (Casting unit)))) Equal to True) and (((Picked unit) is A Hero) Equal to True))) and do (Advanced - Heal (Picked unit) for (OratioDominica / 8.00) hitpoints)
Unit Group - Pick every unit in (Units in (Playable map area)((((Picked unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True) and (((Picked unit) is A Hero) Equal to True))) and do (Unit - Cause (Casting unit) to damage (Picked unit), dealing (OratioDominica / 8.00) damage of attack type Spells and damage type Divine)If there is a simpler way of doing this than please let me know but could someone help me figure out why this isn't working. |
| 02-11-2006, 09:12 PM | #2 |
Please use trigger tags next time. First - its stupid to make trigger for every level of spell... but anyway... hmm you are using WEU triggers for healing, hope they are good, I never use them... you are using Pick every unit in xxx matching condition right? Then you should use Matching unit instead of Picked unit in condition. In main condition use Unit starts effect of an ability, it is much better because it is used when spell actually starts and mana is taken off, because now your spell can be stopped... that won't affect much but well, it would screw abilities like mana flare. I think error is that in Pick every unit instead of picked unit belong to all allies you meant Owner of Picked Unit belong to all allies, same for second. Sorry if I didn't helped you, but WEU addons aren't my stuff. |
| 02-11-2006, 09:20 PM | #3 |
uhhmmm, I think you could also just make "or any condition" thing to the "((((Picked unit) is in (All allies of (Owner of (Casting unit)))) Equal to True)" and make condition like "((Picked unit) is (Casting unit)) Equal to true" if it's possible with that group thingy (I'm too lazy to test it out and GUI sucks anyway). |
| 02-11-2006, 10:09 PM | #4 |
The error that is coming up highlights this line " call TargetHeal( GetFilterUnit(), ( udg_OratioDominica / 8.00 ) )" and says "Expected a function name". Jacek, is this what you ment by matching unit instead of picked unit? Trigger: Unit Group - Pick every unit in (Units in (Playable map area)((((Matching unit) is in (All allies of (Owner of (Casting unit)))) Equal to True) and (((Matching unit) is A Hero) Equal to True))) and do (Advanced - Heal (Matching unit) for (OratioDominica / 8.00) hitpoints)It won't let me make "((((Matching unit) is in (All allies of (Owner of (Casting unit))))" to "((((Owner of (Matching unit) is in (All allies of (Owner of (Casting unit))))" it has to be a unit. |
| 02-11-2006, 10:26 PM | #5 |
Nope... he says that TargetHeal function doesn't exist. WEU apparently translates advanced triggers in some crappy way. Are you sure adding life normally doesn't work? Or maybe try making unit damage itself for -damage which should result in heal. |
| 02-11-2006, 10:28 PM | #6 |
you added advanced triggers to the map, right? |
| 02-11-2006, 10:49 PM | #7 |
He added advanced trigger - there is Advanced - Heal. or you meant he has to add them elsewhere? |
| 02-11-2006, 10:49 PM | #8 |
Umm doesn't just using WEU make advanced triggers available? and "Advanced - Heal" is an advanced option. But ya it looks like the Advanced option doesn't work. Since I can't use it how else would I make this ability? |
| 02-11-2006, 10:51 PM | #9 |
You say healing don't work if it goes over max health. You could make action If ((Picked unit life) + (OratioDominica / 8.00)) is greater than (Picked unit max life) Then Set Picked unit life to 100% |
| 02-11-2006, 10:59 PM | #10 |
ok i will be afk for awhile so when I get back I will try that Jacek, thx. |
| 02-12-2006, 02:48 AM | #11 |
WEU comes with 2 programs, one has a trigger icon and it is just a thing that loads the GUI of the triggers along with other mods to WE, but to use the Advanced triggers you have to use the other program, the enhancer to add the script of the advanced triggers to the map |
| 02-12-2006, 04:22 AM | #12 |
I tried using the enhancer to add the triggers but it always stops responding when it tries to add the script for the advanced triggers. |
| 02-12-2006, 05:35 AM | #13 |
I just finished Jacek's suggestion and I havnt tried it in a real play-through of the map but just testing it out it seemed to work. Thanks for the help. |
