| 04-07-2010, 01:34 PM | #2 | ||
Hi! Quote:
Quote:
I tried to take care of you and rebuild your code in my "NewGen WE.exe" for WC 1.21b. (I have made a 2nd installation like it is said in the instructions for NewGen from Vexorian.) It looks like this now (be careful, I have a german editor): By the way I set up 3 variables: loop = integer Creep_Type = UnitTypeArray Creep_Position = LocationArray Ok, then my jass code looks like this: JASS:function Trig_Revive_Creeps_Actions takes nothing returns nothing local integer CUSTOM set CUSTOM = GetUnitUserData(GetDyingUnit()) call TriggerSleepAction( 6.00 ) call CreateNUnitsAtLoc( 1, udg_Creep_Type[CUSTOM], Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_Creep_Position[CUSTOM], bj_UNIT_FACING ) call SetUnitUserData( GetLastCreatedUnit(), CUSTOM ) //call TriggerRegisterUnitEvent( gg_trg_Display_Damage_System, GetLastCreatedUnit(), EVENT_UNIT_DAMAGED ) 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 Note, that I commented out this, because I have no Display_Damage_System: JASS://call TriggerRegisterUnitEvent( gg_trg_Display_Damage_System, GetLastCreatedUnit(), EVENT_UNIT_DAMAGED )I ran into one problem. I didn't name the trigger in the left vertical window of WE like the trigger in your/my jass code. After renaming the trigger to "Revive Creeps" I could save the map. (Well, I was confused, because it's a long time since I worked in WE.) Then I copied the map and pasted it in my WarcraftIII Version 1.24e and there was no error, I just could play the map and the creeps that I killed respawned every 6 seconds later (set 60 to 6 for testing). So, summary is, that your code works except for the 1 line I commented out where I don't know how your damage system looks. What error exactly do you have? |
