• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Penance Spell Request

Status
Not open for further replies.
Level 7
Joined
Nov 19, 2007
Messages
253
Well i think this could work
  • Penance 1
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Penanace
    • Actions
      • Set PenanceCaster = (Casting unit)
      • Set PenanceTarget = (Target unit of ability being cast)
      • Set PenanceHitCount = 0
      • Trigger - Turn on Penance 2 <gen>
  • Penance 2
    • Events
      • Time - Every 0.66 seconds of game time
    • Conditions
    • Actions
      • Unit - Remove PenanceDummy from the game
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PenanceHitCount Less than or equal to 3
        • Then - Actions
          • Set PenancePoint = (Position of PenanceCaster)
          • Unit - Create 1 Dummy for (Owner of PenanceCaster) at PenancePoint facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_PenancePoint)
          • Set PenanceDummy = (Last created unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (PenanceTarget belongs to an ally of (Owner of PenanceCaster)) Equal to True
            • Then - Actions
              • Unit - Add Penance Heal to PenanceDummy
              • Unit - Set level of Penance Heal for PenanceDummy to (Level of Penanace for PenanceCaster)
              • Unit - Order PenanceDummy to Human Mountain King - Storm Bolt PenanceTarget
            • Else - Actions
              • Unit - Add Penance Damage to PenanceDummy
              • Unit - Set level of Penance Damage for PenanceDummy to (Level of Penanace for PenanceCaster)
              • Unit - Order PenanceDummy to Human Mountain King - Storm Bolt PenanceTarget
          • Set PenanceHitCount = (PenanceHitCount + 1)
        • Else - Actions
          • Unit - Remove PenanceDummy from the game
          • Trigger - Turn off (This trigger)
  • Penance 3
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Penanace
    • Actions
      • Trigger - Turn off Penance 2 <gen>
      • Unit - Remove PenanceDummy from the game
try find ability that channels and casts on target and that should work

Penance heal is stormbolt ability with negative values.
If you have any other questions just ask.
 
Level 14
Joined
Jul 19, 2007
Messages
772
Well i think this could work
  • Penance 1
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Penanace
    • Actions
      • Set PenanceCaster = (Casting unit)
      • Set PenanceTarget = (Target unit of ability being cast)
      • Set PenanceHitCount = 0
      • Trigger - Turn on Penance 2 <gen>
  • Penance 2
    • Events
      • Time - Every 0.66 seconds of game time
    • Conditions
    • Actions
      • Unit - Remove PenanceDummy from the game
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PenanceHitCount Less than or equal to 3
        • Then - Actions
          • Set PenancePoint = (Position of PenanceCaster)
          • Unit - Create 1 Dummy for (Owner of PenanceCaster) at PenancePoint facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_PenancePoint)
          • Set PenanceDummy = (Last created unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (PenanceTarget belongs to an ally of (Owner of PenanceCaster)) Equal to True
            • Then - Actions
              • Unit - Add Penance Heal to PenanceDummy
              • Unit - Set level of Penance Heal for PenanceDummy to (Level of Penanace for PenanceCaster)
              • Unit - Order PenanceDummy to Human Mountain King - Storm Bolt PenanceTarget
            • Else - Actions
              • Unit - Add Penance Damage to PenanceDummy
              • Unit - Set level of Penance Damage for PenanceDummy to (Level of Penanace for PenanceCaster)
              • Unit - Order PenanceDummy to Human Mountain King - Storm Bolt PenanceTarget
          • Set PenanceHitCount = (PenanceHitCount + 1)
        • Else - Actions
          • Unit - Remove PenanceDummy from the game
          • Trigger - Turn off (This trigger)
  • Penance 3
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Penanace
    • Actions
      • Trigger - Turn off Penance 2 <gen>
      • Unit - Remove PenanceDummy from the game
try find ability that channels and casts on target and that should work

Penance heal is stormbolt ability with negative values.
If you have any other questions just ask.
Oh nice but I'm totally lost at triggering spells. Could you pls give a try in my map I will give rep if it works.
 
Level 7
Joined
Nov 19, 2007
Messages
253
Here i made demo map for you you can copy everything into your map..
Follow these instructions:
1)copy Penance Damage, Penance Heal and penance
2)copy dummy if you don't have it already in your map
3)copy all variables
4)copy triggers
If you copy triggers first spell wont work.
 

Attachments

  • Penance.w3x
    15.5 KB · Views: 84
Status
Not open for further replies.
Top