• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Taunt Spell

Status
Not open for further replies.
Also works, but is a bit ugly :D

I just realized that this one can be done with my Effect Over Time System...
However that resource is not yet approved nor finished so you might want to wait a week and then you can use the final version.


  • Legion Commander Duel Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Duel (Legion Commander)
    • Actions
      • Custom script: call EOT_Set_Default_Variables()
      • Set EOT_Param_Source = (Triggering unit)
      • Set EOT_Param_Target = (Target unit of ability being cast)
      • Set EOT_Param_Duration = (3.25 + (0.75 x (Real((Level of (Ability being cast) for (Triggering unit))))))
      • Set EOT_Param_Buff = Custom Duel
      • Set EOT_Param_Buff_Holder = Duel (Buff Holder)
      • Set TempAbility = (Ability being cast)
      • Custom script: set udg_TempInteger = udg_TempAbility
      • Set EOT_Param_Type = (Real(TempInteger))
      • Trigger - Run EOT_Trigger_Create_EOT (ignoring conditions)
      • Custom script: call EOT_Save_Unit(0, GetTriggerUnit())
      • Custom script: call EOT_Set_Default_Variables()
      • Set EOT_Param_Source = (Triggering unit)
      • Set EOT_Param_Target = (Triggering unit)
      • Set EOT_Param_Duration = (3.25 + (0.75 x (Real((Level of (Ability being cast) for (Triggering unit))))))
      • Set EOT_Param_Buff = Custom Duel
      • Set EOT_Param_Buff_Holder = Duel (Buff Holder)
      • Set EOT_Param_Type = (Real(TempInteger))
      • Set EOT_Param_Positive = True
      • Trigger - Run EOT_Trigger_Create_EOT (ignoring conditions)
      • Custom script: call EOT_Save_Unit(0, GetSpellTargetUnit())
  • Legion Commander Duel Effect
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • Set EOT_Param_Target = (Triggering unit)
      • Set TempAbility = Duel (Legion Commander)
      • Custom script: set udg_TempInteger = udg_TempAbility
      • Set EOT_Param_Type = (Real(TempInteger))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Evaluate EOT_Trigger_Get_Data conditions) Equal to True
        • Then - Actions
          • Custom script: set udg_TempUnit = EOT_Load_Unit(0)
          • Custom script: IssueOrderToAttack(GetTriggerUnit(), udg_TempUnit)
        • Else - Actions
  • Legion Commander Duel Kill
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set EOT_Param_Target = (Triggering unit)
      • Set TempAbility = Duel (Legion Commander)
      • Custom script: set udg_TempInteger = udg_TempAbility
      • Set EOT_Param_Type = (Real(TempInteger))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Evaluate EOT_Trigger_Get_Data conditions) Equal to True
        • Then - Actions
          • Custom script: set udg_TempUnit = EOT_Load_Unit(0)
          • Set EOT_Param_Target = (Triggering unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Evaluate EOT_Trigger_Get_Data conditions) Equal to True
            • Then - Actions
              • Trigger - Run EOT_Trigger_Destroy_EOT (ignoring conditions)
              • -------- give bonus damage to udg_TempUnit (TempUnit) --------
            • Else - Actions
        • Else - Actions
And this one must be set in the header file.
JASS:
function IssueUnitToAttack_Callback takes nothing returns nothing
    local timer t = GetExpiredTimer()
	call IssueTargetOrder(LoadUnitHandle(udg_Hashtable, GetHandleId(t), 0), "attack", LoadUnitHandle(udg_Hashtable, GetHandleId(t), 1))
    call FlushChildHashtable(udg_Hashtable, GetHandleId(t))
    call DestroyTimer(t)
    set t = null
endfunction
function IssueUnitToAttack takes unit whichUnit, unit target returns nothing
    local timer t = CreateTimer()
    call TimerStart(t, 0, false, function IssueUnitToStop_Callback)
    call SaveUnitHandle(udg_Hashtable, GetHandleId(t), 0, whichUnit)
    call SaveUnitHandle(udg_Hashtable, GetHandleId(t), 1, target)
    set t = null
endfunction
It requires a hashtable so you also need this:
  • Initialize
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set Hashtable = (Last created hashtable)
 
Also works, but is a bit ugly :D

I just realized that this one can be done with my Effect Over Time System...
However that resource is not yet approved nor finished so you might want to wait a week and then you can use the final version.


  • Legion Commander Duel Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Duel (Legion Commander)
    • Actions
      • Custom script: call EOT_Set_Default_Variables()
      • Set EOT_Param_Source = (Triggering unit)
      • Set EOT_Param_Target = (Target unit of ability being cast)
      • Set EOT_Param_Duration = (3.25 + (0.75 x (Real((Level of (Ability being cast) for (Triggering unit))))))
      • Set EOT_Param_Buff = Custom Duel
      • Set EOT_Param_Buff_Holder = Duel (Buff Holder)
      • Set TempAbility = (Ability being cast)
      • Custom script: set udg_TempInteger = udg_TempAbility
      • Set EOT_Param_Type = (Real(TempInteger))
      • Trigger - Run EOT_Trigger_Create_EOT (ignoring conditions)
      • Custom script: call EOT_Save_Unit(0, GetTriggerUnit())
      • Custom script: call EOT_Set_Default_Variables()
      • Set EOT_Param_Source = (Triggering unit)
      • Set EOT_Param_Target = (Triggering unit)
      • Set EOT_Param_Duration = (3.25 + (0.75 x (Real((Level of (Ability being cast) for (Triggering unit))))))
      • Set EOT_Param_Buff = Custom Duel
      • Set EOT_Param_Buff_Holder = Duel (Buff Holder)
      • Set EOT_Param_Type = (Real(TempInteger))
      • Set EOT_Param_Positive = True
      • Trigger - Run EOT_Trigger_Create_EOT (ignoring conditions)
      • Custom script: call EOT_Save_Unit(0, GetSpellTargetUnit())
  • Legion Commander Duel Effect
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • Set EOT_Param_Target = (Triggering unit)
      • Set TempAbility = Duel (Legion Commander)
      • Custom script: set udg_TempInteger = udg_TempAbility
      • Set EOT_Param_Type = (Real(TempInteger))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Evaluate EOT_Trigger_Get_Data conditions) Equal to True
        • Then - Actions
          • Custom script: set udg_TempUnit = EOT_Load_Unit(0)
          • Custom script: IssueOrderToAttack(GetTriggerUnit(), udg_TempUnit)
        • Else - Actions
  • Legion Commander Duel Kill
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set EOT_Param_Target = (Triggering unit)
      • Set TempAbility = Duel (Legion Commander)
      • Custom script: set udg_TempInteger = udg_TempAbility
      • Set EOT_Param_Type = (Real(TempInteger))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Evaluate EOT_Trigger_Get_Data conditions) Equal to True
        • Then - Actions
          • Custom script: set udg_TempUnit = EOT_Load_Unit(0)
          • Set EOT_Param_Target = (Triggering unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Evaluate EOT_Trigger_Get_Data conditions) Equal to True
            • Then - Actions
              • Trigger - Run EOT_Trigger_Destroy_EOT (ignoring conditions)
              • -------- give bonus damage to udg_TempUnit (TempUnit) --------
            • Else - Actions
        • Else - Actions
And this one must be set in the header file.
JASS:
function IssueUnitToAttack_Callback takes nothing returns nothing
    local timer t = GetExpiredTimer()
	call IssueTargetOrder(LoadUnitHandle(udg_Hashtable, GetHandleId(t), 0), "attack", LoadUnitHandle(udg_Hashtable, GetHandleId(t), 1))
    call FlushChildHashtable(udg_Hashtable, GetHandleId(t))
    call DestroyTimer(t)
    set t = null
endfunction
function IssueUnitToAttack takes unit whichUnit, unit target returns nothing
    local timer t = CreateTimer()
    call TimerStart(t, 0, false, function IssueUnitToStop_Callback)
    call SaveUnitHandle(udg_Hashtable, GetHandleId(t), 0, whichUnit)
    call SaveUnitHandle(udg_Hashtable, GetHandleId(t), 1, target)
    set t = null
endfunction
It requires a hashtable so you also need this:
  • Initialize
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set Hashtable = (Last created hashtable)

Ty so much :D
+REP
 
Status
Not open for further replies.
Back
Top