K
kongkim
Guest
I asked in a tread the other day but idten realy get any anwers that worked
So now i try again.
I use this to trigger scripts to recreate mt creep heros on my rpg map.
//////////////////////////////////////////////////////////////////////////////////
INIT Store Creeps
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))
Set Creep_Level[Loop] = (Hero level 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)
//////////////////////////////////////////////////////////////////////////////////
function Trig_Revive_Creeps_Actions takes nothing returns nothing
local integer CUSTOM
set CUSTOM = GetUnitUserData(GetDyingUnit())
call TriggerSleepAction( 20.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
//////////////////////////////////////////////////////////////////////////////////
Are there plz. anyone there can make THIS trigger Script store there heros level so when it come back its have it start lvl.
An yes i have tri the revive trigger. there are a bug in it. so i cant use it.
it make there creep heros not attack me when they have revive sometimes.. one if i attack on then will attack me.. an non of the other creeps in same group will react to it. so it need to be this tripper script.
I really hope you can help. its one of the only things i need to be finish
So now i try again.
I use this to trigger scripts to recreate mt creep heros on my rpg map.
//////////////////////////////////////////////////////////////////////////////////
INIT Store Creeps
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))
Set Creep_Level[Loop] = (Hero level 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)
//////////////////////////////////////////////////////////////////////////////////
function Trig_Revive_Creeps_Actions takes nothing returns nothing
local integer CUSTOM
set CUSTOM = GetUnitUserData(GetDyingUnit())
call TriggerSleepAction( 20.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
//////////////////////////////////////////////////////////////////////////////////
Are there plz. anyone there can make THIS trigger Script store there heros level so when it come back its have it start lvl.
An yes i have tri the revive trigger. there are a bug in it. so i cant use it.
it make there creep heros not attack me when they have revive sometimes.. one if i attack on then will attack me.. an non of the other creeps in same group will react to it. so it need to be this tripper script.
I really hope you can help. its one of the only things i need to be finish