• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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