• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

Locust problem: read carefully

Status
Not open for further replies.
Level 4
Joined
Aug 18, 2008
Messages
103
Hi all,

I'm making an Escape map project and I would like to know how can I add locust to enemy units.

NOTE: Don't give answer like Object Editor --> Unit --> Abilities - Normal --> Add ability --> Locust.

I need a trigger.

I heard that the only way is to use JASS because GUI is limited.

I have this trigger for GUI:

trigger name: Locust
event: time - elapsed game time is 0.10 seconds
conditions: -
actions: unit group - pick every unit in (units in (playable map area)) and do (if ((unit-type of (picked unit)) not equal to demon hunter) then do (unit - add locust swarm to (picked unit)) elso do (do nothing))

What's wrong with this trigger?
1- All the units in my map have locust (except obviously demon hunters) but when demon hunters enter in collision with one of this units they dont get killed like they are suppose to
2- There are enemy units that are spawned that still don't have locust.
units that have triggers like time - every 3.00 seconds of game time; create 1 units for player 12 bla bla bla
They are suppose to have locust also but i dunno how to do that...

Finally i have this JASS trigger:

trigger name: locust actual

function Trig_Locust_Actual_Func002002001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'Edem' )
endfunction

function Trig_Locust_Actual_Func002002 takes nothing returns nothing
if ( Trig_Locust_Actual_Func002002001() ) then
call UnitAddAbilityBJ( 'Aloc', GetEnumUnit() )
else
call DoNothing( )
endif
endfunction

function Trig_Locust_Actual_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectAll(GetPlayableMapRect()), function Trig_Locust_Actual_Func002002 )
endfunction

//===========================================================================
function InitTrig_Locust_Actual takes nothing returns nothing
set gg_trg_Locust_Actual = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Locust_Actual, 0.10 )
call TriggerAddAction( gg_trg_Locust_Actual, function Trig_Locust_Actual_Actions )
endfunction



Note: I copy/pasted the JASS from an other map does have something to do?


The question is: how can enemy units kill demon hunters when they hit them?
cause with this 2 triggers the demon hunters only go threw enemy units without getting killed..they like pass threw them..

help is always appreciated

thanks
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
Locust ability ''protects'' units from unit group actions.

If you want demon hunter to die when they come in collision with units, do following:
1. Create Permanent Immolation ability
2. Set it's damage to 999999
3. Set it's duration to 0.01

(unit - add locust swarm to (picked unit)

If you want units to be unselectable, add them "Locust" not "Locust Swarm".

Also, you can add locust in object editor.
 
Level 8
Joined
Dec 8, 2007
Messages
312
Child_0f_Bodom is right.

what is wrong with - Object Editor --> Unit -->...Locust - way. it's easy and simple.


but if you want to use your way then:

a)change your trigger
event: unit enters entire map
conditions: entering unit is not Demon hunter
action unit - add locust swarm to (entering unit)

or
b) add to all your spawn triggers
unit - add locust swarm to (last created unit)
 
Level 14
Joined
Mar 4, 2009
Messages
1,156
If you want units to be unselectable, add them "Locust" not "Locust Swarm".

Also, you can add locust in object editor.

EDIT:

locust cannot normally be added with trigger action - add ability,first he needs to create a spellbook and put locust in the spellbook

but the problem is that you cannot remove locust ability once when it is added :(
 
Last edited:
Level 16
Joined
Jul 21, 2008
Messages
1,121
locust cannot normally be added,first he needs to create a spellbook and put locust in the spellbook (hide icon of spellbook with action - player disable spellbook,if you need)

but the problem is that you cannot remove locust ability once when it is added :(

Locust can be added.

Look at this image:
61427d1248440940-locust-problem-read-carefully-locust.jpg


Locust makes unit unselectable. So there is no need to hide icon :S.
 

Attachments

  • Locust.JPG
    Locust.JPG
    31.2 KB · Views: 273
Level 6
Joined
Jul 22, 2008
Messages
243
locust cannot normally be added,first he needs to create a spellbook and put locust in the spellbook (hide icon of spellbook with action - player disable spellbook,if you need)

but the problem is that you cannot remove locust ability once when it is added :(

Uhm, afaik you can add it without a spellbook.
 
Status
Not open for further replies.
Top