• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Life Break Trigger

Status
Not open for further replies.
Level 11
Joined
Jul 9, 2009
Messages
927
I am trying to make a spell out of Huskar's final ability, " Life Break "
I simply know how to make the damage trigger
  • Life Break
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Life Break
    • Actions
      • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing ((Life of (Target unit of ability being cast)) x 0.50) damage of attack type Spells and damage type Magic
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Life Break for (Casting unit)) Equal to 1
        • Then - Actions
          • Unit - Cause (Casting unit) to damage (Casting unit), dealing ((Life of (Casting unit)) x 0.40) damage of attack type Spells and damage type Magic
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Life Break for (Casting unit)) Equal to 2
            • Then - Actions
              • Unit - Cause (Casting unit) to damage (Casting unit), dealing ((Life of (Casting unit)) x 0.33) damage of attack type Spells and damage type Magic
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Life Break for (Casting unit)) Equal to 3
                • Then - Actions
                  • Unit - Cause (Casting unit) to damage (Casting unit), dealing ((Life of (Casting unit)) x 0.25) damage of attack type Spells and damage type Magic
                • Else - Actions
I think my only problem would be is when huskar charges to the opponent. can anyone show me how I could do this ? thanks :D
 
Level 5
Joined
Feb 18, 2009
Messages
123
maybe you could create the special effect on him an then move him every 0.2 sec into the target point then play his attack animation
 
Level 11
Joined
Jul 9, 2009
Messages
927
I do not have enough knowledge on the trigger editor that is why I would want to learn by asking question's here :D
 
Every 0.03 seconds, move the caster closer and closer facing the target point and play his "walk" animation.

Check if the distance between him and the target point is less than or equal to 128.
If that's the case, then stop moving him and deal the damage.

For examples on how to do something like this, you can look up some spells in the Spells section :p
 
Level 11
Joined
Jul 9, 2009
Messages
927
ok then, thanks for the tip, +rep :D

EDIT:
After some scans on the triggers like every 0.03 seconds and more.
I finally made a trigger, but it has a problem
  • CR Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Cannibal Rush
    • Actions
      • Set CRUnit = (Triggering unit)
      • Set CRUnitPoint = (Position of CRUnit)
      • Set CRTarget = (Position of (Target unit of ability being cast))
      • Set CRAngle = (Angle from CRUnitPoint to CRTarget)
      • Set CRDistance = (Distance between CRUnitPoint and CRTarget)
      • Set CRTravel = 0.00
      • Unit - Turn collision for CRUnit Off
      • Animation - Play (Triggering unit)'s attack animation
      • Custom script: call RemoveLocation(udg_CRUnitPoint)
      • Custom script: call RemoveLocation(udg_CRTarget)
      • Trigger - Turn on CR Rush <gen>
  • CR Rush
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CRTravel Greater than or equal to CRDistance
        • Then - Actions
          • Set CRDistance = 0.00
          • Set CRTarget = (Position of CRUnit)
          • Unit - Turn collision for CRUnit On
          • Environment - Create a 0.50 second random deformation at CRTarget with radius 300.00, using depths between -10.00 and 10.00, updating every 0.10 seconds
          • Custom script: call RemoveLocation(udg_CRTarget)
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Set CRUnitPoint = (Position of CRUnit)
          • Set CRTarget = (CRUnitPoint offset by 15.00 towards CRAngle degrees)
          • Unit - Move CRUnit instantly to CRTarget
          • Set CRDistance = (CRDistance + 15.00)
          • Custom script: call RemoveLocation(udg_CRUnitPoint)
          • Custom script: call RemoveLocation(udg_CRTarget)


The problem in the trigger is, when I cast the skill, it does the rush, but then he does not stop rushing and goes until the end of the map and does not stop at the target. Who know how to fix this ?? please help :D
 
Last edited:
Here is your spell fixed although i kinda reassembles them quiet a bit (also file size lowered by .2 kb:D).

  • CR Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Cannibal Rush
    • Actions
      • Set CRUnit = (Triggering unit)
      • Set CRUnitTarget = (Target unit of ability being cast)
      • Unit - Turn collision for CRUnit Off
      • Animation - Play (Triggering unit)'s attack animation
      • Trigger - Turn on CR Rush <gen>
initially off
  • CR Rush
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set CRUnitPoint = (Position of CRUnit)
      • Set CRTarget = (Position of CRUnitTarget)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between CRTarget and CRUnitPoint) Less than or equal to 120.00
        • Then - Actions
          • Unit - Turn collision for CRUnit On
          • Environment - Create a 0.50 second random deformation at CRTarget with radius 300.00, using depths between -10.00 and 10.00, updating every 0.10 seconds
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Set Point = (CRUnitPoint offset by 22.50 towards ((Angle from CRTarget to CRUnitPoint) - 180.00) degrees)
          • Unit - Move CRUnit instantly to Point
          • Custom script: call RemoveLocation(udg_Point)
      • Custom script: call RemoveLocation(udg_CRUnitPoint)
      • Custom script: call RemoveLocation(udg_CRTarget)
 

Attachments

  • Cannibal Rush Fixed.w3x
    13.6 KB · Views: 146
Level 11
Joined
Jul 9, 2009
Messages
927
Kinda makes sense now, did not know that it could be more simple. Thank you for helping. +rep :)
 
Status
Not open for further replies.
Top