• 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.

[General] Trigger Error?

Status
Not open for further replies.
Level 6
Joined
Mar 2, 2013
Messages
127
I've been working on this for a while and can't seem to get it to work.

Here is out its supposed to be,
Unit uses item, dashes at the point. Then after its done unit stops, the units pushes everyone away from him dealing 100 damage aoe.

The problem is the the triggering unit keeps moving.. Anyone know what might be the problem?


  • Dash
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to (==) Spirit Bells
    • Actions
      • Set DashCaster = (Triggering unit)
      • Set DashCasterPoint = (Position of DashCaster)
      • Set DashTarget = (Target point of ability being cast)
      • Set DashAngle = (Angle from DashCasterPoint to DashTarget)
      • Unit - Make DashCaster Invulnerable
      • Trigger - Turn on Dash Movement <gen>
      • Custom script: call RemoveLocation(udg_DashCasterPoint)
  • Dash Movement
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set DashCasterPoint = (Position of DashCaster)
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Distance between DashCasterPoint and DashTarget) Less than or equal to (<=) 40.00
          • Then - Actions
            • Unit - Turn collision for DashCaster On
            • Unit - Make DashCaster Vulnerable
            • Trigger - Turn off (This trigger)
          • Else - Actions
            • Set DashLength = (DashCasterPoint offset by 30.00 towards DashAngle degrees)
            • Unit - Turn collision for DashCaster Off
            • Unit - Move DashCaster instantly to DashLength
  • Pushy
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to (==) Dash Push
    • Actions
      • Set TempPointA = (Position of (Triggering unit))
      • Set TempGroup = (Units within 200.00 of TempPointA)
      • -------- Conditions are for deciding whether a unit should be possible to knock. I guess buildings should not. --------
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is A structure) Equal to (==) False
              • ((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to (==) True
            • Then - Actions
              • Set TempPointB = (Position of (Picked unit))
              • Set KnockAngle[(Custom value of (Picked unit))] = (Angle from TempPointA to TempPointB)
              • Set KnockSpeed[(Custom value of (Picked unit))] = 50.00
              • Unit Group - Add (Picked unit) to KnockedGroup
              • Unit Group - Pick every unit in KnockedGroup and do (Actions)
                • Loop - Actions
                  • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 100.00 damage of attack type Hero and damage type Normal
                  • Special Effect - Create a special effect attached to the chest of DashCaster using Abilities\Spells\NightElf\Taunt\TauntCaster.mdl
                  • Special Effect - Destroy (Last created special effect)
              • Trigger - Turn on KnockbackLoop <gen>
              • Custom script: call RemoveLocation(udg_TempPointB)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPointA)
      • Custom script: call DestroyGroup(udg_TempGroup)
  • PushyB
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in KnockedGroup) Greater than (>) 0
        • Then - Actions
          • Unit Group - Pick every unit in KnockedGroup and do (Actions)
            • Loop - Actions
              • Set TempPointA = (Position of (Picked unit))
              • Set TempPointB = (TempPointA offset by KnockSpeed[(Custom value of (Picked unit))] towards KnockAngle[(Custom value of (Picked unit))] degrees)
                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Terrain pathing at TempPointB of type Walkability is off) Equal to (==) False
                    • KnockSpeed[(Custom value of (Picked unit))] Greater than (>) 0.00
                  • Then - Actions
                    • -------- Using custom script to not interrupt orders --------
                    • Custom script: call SetUnitX(GetEnumUnit(),GetLocationX(udg_TempPointB))
                    • Custom script: call SetUnitY(GetEnumUnit(),GetLocationY(udg_TempPointB))
                    • Set KnockSpeed[(Custom value of (Picked unit))] = ((KnockSpeed[(Custom value of (Picked unit))] x 0.90) - 0.50)
                  • Else - Actions
                    • Unit Group - Remove (Picked unit) from KnockedGroup
              • Custom script: call RemoveLocation(udg_TempPointA)
              • Custom script: call RemoveLocation(udg_TempPointB)
              • Custom script: call RemoveLocation(udg_DashCasterPoint)
        • Else - Actions
          • Trigger - Turn off (This trigger)
 
Level 6
Joined
Mar 2, 2013
Messages
127
It doesn't create the unit :/
The unit just goes to the middle of the map.
The problem is the DashTarget.
I changed it to, unit starts the effect of an ability and I gave the ability to a unit.
It created the unit, and when to the DashTarget.

For some reason it doesn't work when its an item.
 
Level 10
Joined
Mar 17, 2012
Messages
582
lol idc, just need some help with the problem :/

well, I have 2 different spells, but if you will compose them - ot will work:

Here hero leaps to the point:
Leap.jpg
And here he throughs everybody))))
Burst.jpg
 
Level 6
Joined
Mar 2, 2013
Messages
127
I found out the problem but now I have a new problem that I don't know how to hit :/
The problem I fixed was just change this
  • Dash
  • Events
  • Unit - A unit Uses an item
  • Conditions
  • (Item-type of (Item being manipulated)) Equal to (==) Spirit Bells
To
  • Dash
  • Events
  • Unit - a unit starts the effect of an ability
  • conditions
  • abilitys being cast = Dash Push
My new problem is since the the ability last 0.001 seconds long, they 3rd trigger starts when the Dash Movement is still running. Could I change it so the 3rd trigger doesn't activate until the 2nd trigger is finished.

I tried making a condition for trigger 3 to have trigger 2 be off before it activates but since its
  • Events
  • Unit - A unit Finishes casting an abilit
It doesn't seem to work.
 
Status
Not open for further replies.
Top