- 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
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