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

[Trigger] Pull Ability

Status
Not open for further replies.

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
Pull means the target will be push toward ur position right?
If that's what u want, I have the trigger for u: (Note, u must use the Unit Indexer to make this spell works well).
  • Chaos Rift
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Chaos Rift
    • Actions
      • Unit Group - Add (Triggering unit) to CR_UnitGroup
      • Set CR_CV = (Custom value of (Triggering unit))
      • Set CR_Caster[CR_CV] = (Triggering unit)
      • Set CR_CasterPos[CR_CV] = (Position of (Triggering unit))
      • Set CR_Angle[CR_CV] = (Facing of (Triggering unit))
      • Set CR_MovePos[CR_CV] = (CR_CasterPos[CR_CV] offset by 50.00 towards CR_Angle[CR_CV] degrees)
      • Set CR_Target[CR_CV] = (Target unit of ability being cast)
      • Set CR_TargetPos[CR_CV] = (Position of CR_Target[CR_CV])
      • Set CR_Speed[CR_CV] = 24.00
      • Unit - Pause (Triggering unit)
      • Unit - Turn collision for CR_Target[CR_CV] Off
      • Custom script: call RemoveLocation(udg_CR_TargetPos[udg_CR_CV])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Chaos Rift Move <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Chaos Rift Move <gen>
        • Else - Actions
  • Chaos Rift Move
    • 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
          • (CR_UnitGroup is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Unit Group - Pick every unit in CR_UnitGroup and do (Actions)
            • Loop - Actions
              • Set CR_CV = (Custom value of (Picked unit))
              • Set CR_TargetPos[CR_CV] = (Position of CR_Target[CR_CV])
              • Set CR_Distance[CR_CV] = (Distance between CR_TargetPos[CR_CV] and CR_MovePos[CR_CV])
              • Set CR_Distance[CR_CV] = (CR_Distance[CR_CV] - 100.00)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CR_Distance[CR_CV] Greater than 0.00
                • Then - Actions
                  • Set CR_Angle[CR_CV] = (Angle from CR_TargetPos[CR_CV] to CR_MovePos[CR_CV])
                  • Set CR_LoopPos[CR_CV] = (CR_TargetPos[CR_CV] offset by CR_Speed[CR_CV] towards CR_Angle[CR_CV] degrees)
                  • Unit - Move CR_Target[CR_CV] instantly to CR_LoopPos[CR_CV], facing CR_CasterPos[CR_CV]
                  • Special Effect - Create a special effect at CR_LoopPos[CR_CV] using Abilities\Spells\Demon\DemonBoltImpact\DemonBoltImpact.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect at CR_LoopPos[CR_CV] using Abilities\Spells\Human\Feedback\ArcaneTowerAttack.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveLocation(udg_CR_TargetPos[udg_CR_CV])
                  • Custom script: call RemoveLocation(udg_CR_LoopPos[udg_CR_CV])
                • Else - Actions
                  • Custom script: call RemoveLocation(udg_CR_CasterPos[udg_CR_CV])
                  • Custom script: call RemoveLocation(udg_CR_TargetPos[udg_CR_CV])
                  • Custom script: call RemoveLocation(udg_CR_MovePos[udg_CR_CV])
                  • Unit - Turn collision for CR_Target[CR_CV] On
                  • Unit - Unpause (Picked unit)
                  • Unit Group - Add (Picked unit) to CR_AffectedUnit
                  • Unit Group - Remove (Picked unit) from CR_UnitGroup
The above triggers will work for this pulling spell: Cast on 1 target, the target will be pull to the point that is in front of ur position and will face u. However, the caster will be pause (to avoid using trick to make the game more balance) until the target is moved to the move point.
 
Status
Not open for further replies.
Top