"Berserker Unit"

yamifowl

Member
Reaction score
2
Hi ppl...
I'm in need of some help...
I'm wanting to create a Berserker unit...
It's main "pro/con" would be this...
"Whenever this unit starts attacking, while there are enemy units in range (acquisition range of 500) it will not stop attacking... Even if the player order it to retreat, the berserker wont..."
How can I do that?
I tried lots of triggers, but I couldn't get the right effect...
Oh, and I tried "changin the Berserke into Neutral Hostile" but It can't be done since it will only attack enemy units, it's not intented to attack friends...

Thanks!!!
 

hi_im_bob

......and you are?
Reaction score
44
I think that there is a cinematics trigger that will not allow you to click on units, but that could be all units.....
 
P

Peanuthead

Guest
You could give it/take away the Locust ability. The Locust ability makes units unselectable. Or you could just spam the order constantly. Do you mean like the Berserker from Gears of War?
 

Kelv

TH.net Regular
Reaction score
7
Well I tried creating a trigger for you, problem is.... the game crashes while loading. I'm not that good at triggers anyway. I uploaded the trigger for you to try and modify to get it to work.


This trigger deselects the unit
Code:
Untitled Trigger 001
    Events
        Map initialization
    Conditions
    Actions
        Set Picked_Units = (All enemies of (Owner of Peasant 0000 <gen>))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (berserker ring <gen> contains (Picked unit)) Equal to True
            Then - Actions
                Selection - Remove Peasant 0000 <gen> from selection for (Owner of Peasant 0000 <gen>)
            Else - Actions
        Trigger - Run Untitled Trigger 001 <gen> (checking conditions)

This trigger moves a region around the berserker unit.

Code:
Untitled Trigger 002
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Region - Center berserker ring <gen> on (Position of Peasant 0000 <gen>)

Edit: Actually it would be much better to use the Locust ability I think for lag reasons. The only problem with these suggestions is that if the unit is supposed to have spells, you won't be able to use them in combat. You could just edit it instead of making the unit unselectable, making the movement speed for the unit to 0 so it can't run away but then your problem is now it can't chase after the unit.
 
S

Sunny_D

Guest
the trigger with the rect... what is that supposed to do then? always attack units within? consider also that the rect has to be a variable..

locust would make the unit also untargetable, what means the enemy wont be able to attack it... atm i duno a good mui-solution... but ill see if i find something...
 

Kelv

TH.net Regular
Reaction score
7
My thought for the region (if thats what you mean by rect) was that if there was a enemy unit inside the region, the player wouldn't have control over the berserker unit. As far as I know, I haven't found in option to check if there are units within blank of unit. Only if a unit comes within. unfortunately regions can't be circles. I thought the idea of a region was good but I have little experience with creating my own complex triggers. I also know only how to do the most basic jass trigger.
 
S

Sunny_D

Guest
My thought for the region (if thats what you mean by rect) was that if there was a enemy unit inside the region, the player wouldn't have control over the berserker unit.

sure, i know you wanted that, but how would you trigger that the player doesnt have control over the berserker. thats what i meant. you cant use locust though...

anyway, i tried something myself and it works so far... test it and judge yourself if that fits what you need... i have attached a sample map...
 

Attachments

  • Berserk Mode.w3x
    17.9 KB · Views: 148

Sooda

Diversity enchants
Reaction score
318
If your map is custom and you don' t care about end-game score you could try this if you got computer controlled allyed player. Just give control of that unit to computer and don' t change units owner color. It is best what I can think of.
Code:
Unit - Change ownership of (Triggering unit) to Player 1 (Red) and Retain color
:)
 

Curuinor

New Member
Reaction score
7
If your map is like an AoS, give the unit to one of the sides of the allied creeps. If you care about score, hide the units from the score screen. >_>
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top