Y Doesn't this heal or damage the targeted unit?

inevit4ble

Well-Known Member
Reaction score
38
Hi Every1,

The base spell is holy light with "self" added as "targets allows". Its supposed to heal if the target is non-Undead (enemy or ally) but it doesn't do either of the Life adjusting lines. It does increment the casts and stops casting when the limit is reached. Just doesn't do the effect.

Trigger:
  • Lay On Hands
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Lay On Hands
    • Actions
      • Set MyPlayerGroup = (Player group((Owner of (Triggering unit))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • LayOnHandsCasts Less than PalaMaxLayOnHands
        • Then - Actions
          • Set LayOnTotal = ((Real((Level of (Triggering unit)))) x (Real(ModWis[((Player number of (Owner of (Triggering unit))) - 1)])))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Race of (Targeted unit)) Not equal to Undead
            • Then - Actions
              • Unit - Set life of (Targeted unit) to ((Life of (Targeted unit)) + LayOnTotal)
            • Else - Actions
              • Unit - Set life of (Targeted unit) to ((Life of (Targeted unit)) - LayOnTotal)
          • Set LayOnTotal = 0.00
          • Set LayOnHandsCasts = (LayOnHandsCasts + 1)
        • Else - Actions
          • Unit - Order (Triggering unit) to Stop
          • Game - Display to MyPlayerGroup the text: You have reached yo...
      • Custom script: call DestroyForce(udg_MyPlayerGroup)


Thx in advance

PS: The Event is set to Begins Casting instead of Starts effect so it stops the spell before the graphic effects occur when the limit is reached
 

vypur85

Hibernate
Reaction score
803
Change all your 'Targeted unit' to 'Unit of ability being cast'. It should work afterwards.

PS: Same goes for your other thread problem.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
he is correct, targeted unit refers to when a unit is ordered something with a target ie: cast order string or attack. you need target of ability being cast unless you change the event to event a unit is ordered (your abilities cast string) targeting a unit
 

inevit4ble

Well-Known Member
Reaction score
38
ok cool thanks. silly mistakes :/

Working Trigger for anyone who encounters the same problem
Trigger:
  • Lay On Hands
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Lay On Hands
    • Actions
      • Set MyPlayerGroup = (Player group((Owner of (Triggering unit))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • LayOnHandsCasts Less than PalaMaxLayOnHands
        • Then - Actions
          • Set LayOnTotal = ((Real((Level of (Triggering unit)))) x (Real(ModWis[((Player number of (Owner of (Triggering unit))) - 1)])))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Race of (Target unit of ability being cast)) Not equal to Undead
            • Then - Actions
              • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + LayOnTotal)
            • Else - Actions
              • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - LayOnTotal)
          • Set LayOnTotal = 0.00
          • Set LayOnHandsCasts = (LayOnHandsCasts + 1)
        • Else - Actions
          • Unit - Order (Triggering unit) to Stop
          • Game - Display to MyPlayerGroup the text: You have reached yo...
      • Custom script: call DestroyForce(udg_MyPlayerGroup)
 

X-maul

AKA: Demtrod
Reaction score
201
May I lead your attention to this thread:
http://www.thehelper.net/forums/showthread.php/66660-World-Editor-Help-Forum-Rules-And-Guidelines
Take all the time you need to write your posts, forums are not the same as chat - for example instead of writing "gratz" or "ne1" you should use "congratulations" and "anyone" so that everybody can understand you easily. Also try to put periods and capital letters where they're supposed to be, this greatly increases readability. Acronyms are OK, but try to avoid leetspeak.

Non-offensive ofcourse.
 

X-maul

AKA: Demtrod
Reaction score
201
We got our guidelines and rules for a reason, and I for one is anoyed by people writing "becuz" instead of because, "Y" instead of why, "thx" instead of thanks, eg.
 

inevit4ble

Well-Known Member
Reaction score
38
We got our guidelines and rules for a reason, and I for one is anoyed by people writing "becuz" instead of because, "Y" instead of why, "thx" instead of thanks, eg.

I understand your position and tbh the rules make sense and aren't over board or ridiculous at all and I should be more considerate to other peoples views. And I have no idea how those abbreviations come out for people that translate these pages to their respective languages.

Therefore you shall not be exasperated by this informality in the future.

Happy Mapping :D?
 
Reaction score
7
This is just my opinion, but I believe abbreviating things is OK in online chat (because you need to type quickly) as long as the other person can understand you but posting in forums is more formal and deserves proper spelling, especially because a lot of newbs post here.
Someone once replied to my question about DotA using the abbreviation 'BoT' (Boots of Travel). I had to post back asking what it stood for. :(
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top