• 🏆 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!

Berserker's Call (Taunt)

Status
Not open for further replies.
Level 3
Joined
Jan 13, 2011
Messages
33
I wish to create a spell (similar to Berserker's Call from DotA) which when casted, forces units in a specific area of effect to be forced to attack the spell caster for a specific duration. I thought creating it would be just some small modifications of Taunt, but turns out it ain't that simple, since the units that are Taunted can stop attacking at any time. So what should I do?
 
Take note that this is not MUI, because I don't know how to refer to the caster in the second trigger.

  • Berserker's Call Cast
    • Events
      • Unit - A unit starts an effect of an ability
    • Conditions
      • (Ability being cast) equal to Berserker's Call
    • Actions
      • Set BerserkersCallCaster = (Casting unit)
      • Unit Group - Pick every unit within <Range of Berserker's Call> matching <If you have certain conditions> of (Casting unit) and do (Actions)
        • Loop - Actions
          • Set BerserkersCallUnitPoint = (Position of (Picked unit))
          • Unit - Create Dummy Unit for (Triggering Player) at BerserkersCallUnitPoint facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_BerserkersCallUnitPoint)
          • Unit - Order (Last created unit) to <Place a buff that has no effects; but lasts as long as the duration of Berserker's Call>
          • Unit Group - Add (Picked Unit) to BerserkersCallGroup
  • Berserker's Call Unit Attack
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in BerserkersCallGroup and to (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack BerserkersCallCaster
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Picked unit) has <The buff you placed earlier> Equal to False
            • Then - Actions
              • Unit Group - Remove (Picked unit) from BerserkersCallGroup
              • Unit - Order (Picked unit) to Stop
            • Else - Actions
 
Last edited:
Level 7
Joined
Aug 19, 2010
Messages
174
a simpler way

Take note that this is not MUI, because I don't know how to refer to the caster in the second trigger.

  • Berserker's Call Cast
    • Events
      • Unit - A unit starts an effect of an ability
    • Conditions
      • (Ability being cast) equal to Berserker's Call
    • Actions
      • Set BerserkersCallCaster = (Casting unit)
      • Unit Group - Pick every unit within <Range of Berserker's Call> matching <If you have certain conditions> of (Casting unit) and do (Actions)
        • Loop - Actions
          • Set BerserkersCallUnitPoint = (Position of (Picked unit))
          • Unit - Create Dummy Unit for (Triggering Player) at BerserkersCallUnitPoint facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_BerserkersCallUnitPoint)
          • Unit - Order (Last created unit) to <Place a buff that has no effects; but lasts as long as the duration of Berserker's Call>
          • Unit Group - Add (Picked Unit) to BerserkersCallGroup
  • Berserker's Call Unit Attack
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in BerserkersCallGroup and to (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack BerserkersCallCaster
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Picked unit) has <The buff you placed earlier> Equal to True
            • Then - Actions
              • Unit Group - Remove (Picked unit) from BerserkersCallGroup
              • Unit - Order (Picked unit) to Stop
            • Else - Actions

I respect your work man,but if this spell is like the one on that test map on this site,then I have to speak out,you aproached this problem the wrong way.Berserkers Call is actualy a spell known as taunt,and the only thing special about it is that it gives 30 armor,you only need trigers to give the caster of BC 30 armor for the duration of the spell,nothing more
 
Level 5
Joined
Sep 1, 2010
Messages
168
Question: Do you want to force all units upon cast to attack the casting unit or do you want to catch every unit coming into a certain range of that unit too to be forced to attack while spell lasts?
Apart from that: The spell can be made mui... you'll need either hashtables or unit group arrays, most likely a combination leadin to the easiest solution.

If you're interested in some more details, I could spend a bit time explaining once I'm bacl from uni later in the day..
 
I respect your work man,but if this spell is like the one on that test map on this site,then I have to speak out,you aproached this problem the wrong way.Berserkers Call is actualy a spell known as taunt,and the only thing special about it is that it gives 30 armor,you only need trigers to give the caster of BC 30 armor for the duration of the spell,nothing more

He told me that he didn't want the unit to be able to disrupt the attack order.
I gave him something almost like it. You can just add 30 armor via triggers, I know that, but I don't really know the spell itself.
 
Level 23
Joined
Oct 12, 2008
Messages
1,783
I gave him something almost like it. You can just add 30 armor via triggers, I know that, but I don't really know the spell itself.

Actually you are right and the guy asking for the sample is wrong.

Berserkers Call works nothing like Taunt, since its a continous force attack as opposed to a once off.
 
Level 9
Joined
Dec 3, 2010
Messages
162
I do know that Berserker's Call periodically forces the enemies to attack the caster. However, you can pretty much prevent it by spamming stop. A better way to approach this problem would be to do it this way:


  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set TaHash = (Last created hashtable)
  • Taunt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Taunt
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Set TempGroup = (Units within 400.00 of TempPoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack (Triggering unit)
          • Unit Group - Add (Picked unit) to TaGroup
          • Set Key = (Key (Picked unit))
          • Hashtable - Save 5.00 as 0 of Key in TaHash
          • Hashtable - Save Handle Of(Triggering unit) as 1 of Key in TaHash
      • Trigger - Turn on Taunt Periodic <gen>
      • Trigger - Turn on Taunt Force <gen>
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup(udg_TempGroup)
  • Taunt Periodic (Initially off)
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TaGroup) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Trigger - Turn off Taunt Force <gen>
        • Else - Actions
          • Unit Group - Pick every unit in TaGroup and do (Actions)
            • Loop - Actions
              • Set Key = (Key (Picked unit))
              • Set TempReal = (Load 0 of Key from TaHash)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TempReal Less than or equal to 0.00
                • Then - Actions
                  • Unit Group - Remove (Picked unit) from TaGroup
                  • Hashtable - Clear all child hashtables of child Key in TaHash
                • Else - Actions
                  • Hashtable - Save (TempReal - 0.10) as 0 of Key in TaHash
  • Taunt Force (Initially off)
    • 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
      • ((Triggering unit) is in TaGroup) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit - Order (Triggering unit) to Attack (Load 1 of (Key (Triggering unit)) in TaHash)
      • Trigger - Turn on (This trigger)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
0.10 second of interval ?
Too slow for human reaction dude, change it to 0.03 second.

Axe's Counter Helix triggered upon "ordering an attack", not when it receives damage, buy upon obeying the Event - Unit is attacked
So, even if enemy player unit cancels attack order by spamming "S" button, the unit still obeying the Event - Unit is attacked because it is about to launch the attack, making the "attack" works earlier before the damage is landed

Pretty much Counter Helix works like this, not on damage trigger, but on Unit is attacked Event triggered.

In this case, even if the player spamming "S", it can't run away from attacking the target so that pretty much explains all the mechanics of Axe from DotA.
 
Level 9
Joined
Dec 3, 2010
Messages
162
0.10 second of interval ?
Too slow for human reaction dude, change it to 0.03 second.

Axe's Counter Helix triggered upon "ordering an attack", not when it receives damage, buy upon obeying the Event - Unit is attacked
So, even if enemy player unit cancels attack order by spamming "S" button, the unit still obeying the Event - Unit is attacked because it is about to launch the attack, making the "attack" works earlier before the damage is landed

Pretty much Counter Helix works like this, not on damage trigger, but on Unit is attacked Event triggered.

In this case, even if the player spamming "S", it can't run away from attacking the target so that pretty much explains all the mechanics of Axe from DotA.

Do you even understand the trigger? The periodic trigger doesn't force attack. Yes, but this isn't DotA. Keep in mind.
 
Status
Not open for further replies.
Top