• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Berserker Unit Script

Status
Not open for further replies.
Level 3
Joined
May 28, 2019
Messages
39
Hi guys!
I'm currently making a spell, which makes unit aggressive to all.

I need to trigger two specific fuctions:
1. This unit must attack anyone. Even his own team. So if I cast my spell on two units, they'll have to kill each other.
2. If possible, I'd like to gain experience for units, killed by the berserker

I haven't managed to find any information on this issue.

Thank you very much in advance!
 
Level 3
Joined
May 28, 2019
Messages
39
I'm thinking of progressive duration, depending on ability level, but it is not necessary.

Target = closest unit in sight range. When target dies, switch to another closest unit. Like neutral hostile, but with attacking allies.
 
Level 7
Joined
Jul 4, 2007
Messages
249
Do you want to have control over the unit? If not, you could just change its owner to neutral hostile or something.
Precisely what I was thinking. The thing is, even if he wanted to have control over it then the ability would make no sense whatsoever.
Doesn't work if there's neutral hostile targets aswell, if not it's fine if you remove the bounty.
 
Level 3
Joined
May 28, 2019
Messages
39
Changing team won't work because affected units have to fight each other as well (they just won't do it if they have the same team).

Nevertheless, I understand that my plan can be too difficult. Then I just need to know it for sure.

And no - I don't want to have control over affected units - I consider them as uncontrollable insane killing machines.
 

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,895
And if there's more than 2 berserking units this won't work.
So basically - 1) have an used player slot (neutral extra)
2) when it becomes berserker, change owner
3) order to attack the nearest unit
If you change owner after ordering the attack, the unit will cancel the order.
 
Level 23
Joined
Oct 18, 2008
Messages
938
you want to catch orders.

e:
unit is issued order targeting a point
unit is issued order targeting an object
etc
c:
unit is berserked
a:
turn off this trigger
make unit attack berserk target
turn on this trigger

it doesn't tend to be perfect though (spamming orders lets you cancel attack swings) so you may also want to change the units owner
 
Status
Not open for further replies.
Top