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

[JASS] Neutral camp respawn system...

Status
Not open for further replies.
Hi the Hive Community!

I am searching a Neutral camp revival system for my map similar to the one in Dota...

It would be helpful if u could give me a code or a link related to my question
- someone mention Dota template in another thread were he got the Dota Multiboard from
dunno if something like that exists but i would be interested to get a related link to the topic, too!

plz help me!

-Palaslayer
 
the first link gives me this trigger:

  • SpawnSystem Respawn
    • Events
      • Unit - A unit owned by neutral passive dies
    • Conditions
    • Actions
      • Custom script: local unit udg_SystemSpawn_RespawnUnit
      • Custom script: local integer udg_SystemSpawn_RespawnUnitIndex
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Conditions
              • (Dying unit) equal to SystemSpawn_SpawnUnit[(Integer A)]
            • 'THEN'-Actions
              • Set SystemSpawn_RespawnUnitIndex = (Integer A)
            • 'ELSE'-Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Conditions
          • SystemSpawn_RespawnUnitIndex greater than 0
        • 'THEN'-Actions
          • Skip remaining actions
        • 'ELSE'-Actions
      • Unit - Create 1 (Unit-type of (Dying unit)) for neutral enemy at ((Center of (Entire map)) offset by (SystemSpawn_SpawnPointX[SystemSpawn_RespawnUnitIndex], SystemSpawn_SpawnPointY[SystemSpawn_RespawnUnitIndex])) facing default for Building-Facing degrees
      • Set SystemSpawn_SpawnUnit[SystemSpawn_RespawnUnitIndex] = (Last created unit)
      • Set SystemSpawn_RespawnUnit = SystemSpawn_SpawnUnit[SystemSpawn_RespawnUnitIndex]
      • Unit - Hide SystemSpawn_RespawnUnit
      • Wait 5.00 seconds
      • Unit - Unhide SystemSpawn_RespawnUnit

not sure if it will work
 
i did something on my own

JASS:
function Trig_Neutral_Respawn_2_Actions takes nothing returns nothing
    call CreateNUnitsAtLoc( 1, GetUnitTypeId(NEUTRAL), Player(PLAYER_NEUTRAL_AGGRESSIVE), CAMP, bj_UNIT_FACING )
endfunction

function Trig_Func001002003 takes nothing returns boolean
    return ( GetOwningPlayer(GetFilterUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) )
endfunction


//===========================================================================
function InitTrig_Neutral_Respawn_2 takes nothing returns nothing
    local unit NEUTRAL
    local group GROUP
    local location CAMP
    set gg_trg_Neutral_Respawn_2 = CreateTrigger(  )
    set GROUP = GetUnitsInRectMatching(GetEntireMapRect(),( Condition( function Trig_Func001002003 ))
    call ForGroupBJ( GROUP, GetEnumUnit() )
    loop
        set NEUTRAL = GetDyingUnit()
        set CAMP = GetUnitLoc( GetDyingUnit() )
    endloop
    call TriggerRegisterTimerEventPeriodic( gg_trg_Neutral_Respawn_2, 120.00 )
    call TriggerRegisterPlayerUnitEventSimple( gg_trg_Neutral_Respawn_2, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddAction( gg_trg_Neutral_Respawn_2, function Trig_Neutral_Respawn_2_Actions )
endfunction

why does this trigger not work???

plz i n help :(
 
Status
Not open for further replies.
Top