Err... JASS?

Anything.

New Member
Reaction score
69
I know abosolutely nothing about JASS and I want to change this code by AceHart to when a unit owned by Player 10 dies instead of Neutral Agressive.

Code:
function Trig_RespawnCreeps_Test takes nothing returns boolean
    return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) )
endfunction

function Trig_RespawnCreeps_Actions takes nothing returns nothing
    local location Position = GetUnitLoc(GetDyingUnit())
    local integer Level = GetUnitLevel(GetDyingUnit())
    loop
        call PolledWait( GetRandomReal(25.00, 30.00) )
        exitwhen ( IsUnitGroupEmptyBJ(GetUnitsInRangeOfLocMatching(300.00, Position, Condition(function Trig_RespawnCreeps_Test))) == true )
    endloop
    call CreateNUnitsAtLoc( 1, ChooseRandomCreepBJ(Level), Player(PLAYER_NEUTRAL_AGGRESSIVE), Position, bj_UNIT_FACING )
endfunction

function InitTrig_RespawnCreeps takes nothing returns nothing
    set gg_trg_RespawnCreeps = CreateTrigger(  )
    call TriggerRegisterPlayerUnitEventSimple( gg_trg_RespawnCreeps, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddAction( gg_trg_RespawnCreeps, function Trig_RespawnCreeps_Actions )
endfunction
Can someone help me?
 

Anything.

New Member
Reaction score
69
Cs_Cara said:
Shoudnt this be in the JASS section?
Er, so sorry. I try to keep away from that place so much that it became impulse to post in the regular board...
smith_s9 said:
Change all the 'PLAYER_NEUTRAL_AGGRESSIVE' to '9'
Okay, I will try that. Thank you.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top