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

[Trigger] Problem with my Respawn Trigger

Status
Not open for further replies.
Level 1
Joined
Dec 23, 2008
Messages
5
Hi yall, i just got a prob with my respawn trigger. Im using Ryoko's creep respawn method. Which is this :

Part 1
  • Events
    • Map initialization
    • Time - Elapsed game time is 2.00 seconds
  • Conditions
  • Actions
    • Set Loop = 0
    • Unit Group - Pick every unit in (Units owned by Neutral Hostile) and do (Actions)
      • Loop - Actions
        • Set Creep_Type[Loop] = (Unit-type of (Picked unit))
        • Set Creep_Position[Loop] = (Position of (Picked unit))
        • Unit - Set the custom value of (Picked unit) to Loop
        • Set Loop = (Loop + 1)
    • Destructible - Pick every destructible in (Playable map area) and do (Actions)
      • Loop - Actions
        • Destructible - Open All walls of (Picked destructible)
Part 2

function Trig_Revive_Creeps_Actions takes nothing returns nothing
local integer CUSTOM
set CUSTOM = GetUnitUserData(GetDyingUnit())
call TriggerSleepAction( 60.00 )
call CreateNUnitsAtLoc( 1, udg_Creep_Type[CUSTOM], Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_Creep_Position[CUSTOM], bj_UNIT_FACING )
call SetUnitUserData( GetLastCreatedUnit(), CUSTOM )
endfunction

//===========================================================================
function InitTrig_Revive_Creeps takes nothing returns nothing
set gg_trg_Revive_Creeps = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Revive_Creeps, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Revive_Creeps, function Trig_Revive_Creeps_Actions )
endfunction
I tested it out on a new fresh map and it worked perfectly. It respawned the creeps at the location they started at with no prob at all.

But when i used it on my map, when the map began, WC3 just froze completely and i had to restart my computer.

Here is my map : LotE RPG UF.w3x
Warning : IF u decide to open the map, dont play it or ur computer will freeze.

I would apreciate any help to correct any error in the trigger or w/e is causing the problem. ^^

:fp: ~Andrez
 
Status
Not open for further replies.
Top