- Joined
- Mar 3, 2009
- Messages
- 327
I'm trying to make a creep revival system for my RPG. I'm good with gui, but im only beginning to dabble in JASS. Anyway;
Thats what i have so far. When timer t expires i want it to do
In the same function, so it doesnt stuff up my local variables. I know it's possible but I'm just starting with JASS so yeah
Also, can noone please try and convert me to vJASS, i've tried all i can and JNGP will not work.
JASS:
function Trig_creeprevive_Copy_Copy_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) != 'h002' ) ) then
return false
endif
return true
endfunction
function Trig_creeprevive_Copy_Copy_Func005Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h00B' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h00C' ) ) then
return true
endif
return false
endfunction
function Trig_creeprevive_Copy_Copy_Func005C takes nothing returns boolean
if ( not Trig_creeprevive_Copy_Copy_Func005Func001C() ) then
return false
endif
return true
endfunction
function Trig_creeprevive_Copy_Copy_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local timer t = CreateTimer()
call StartTimerBJ( t, false, 20.00, )
endfunction
//===========================================================================
function InitTrig_creeprevive_Copy_Copy takes nothing returns nothing
set gg_trg_creeprevive_Copy_Copy = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_creeprevive_Copy_Copy, Player(11), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_creeprevive_Copy_Copy, Condition( function Trig_creeprevive_Copy_Copy_Conditions ) )
call TriggerAddAction( gg_trg_creeprevive_Copy_Copy, function Trig_creeprevive_Copy_Copy_Actions )
endfunction
Thats what i have so far. When timer t expires i want it to do
JASS:
call CreateNUnitsAtLoc( 1, GetUnitTypeId(u), Player(11), udg_Creep_Point[GetUnitUserData(u)], 270 )
call SetUnitUserData( GetLastCreatedUnit(), GetUnitUserData(u) )
if ( Trig_creeprevive_Copy_Copy_Func005C() ) then
call SetUnitVertexColorBJ( GetLastCreatedUnit(), GetRandomReal(30.00, 100.00), GetRandomReal(30.00, 100.00), GetRandomReal(30.00, 100.00), 0 )
else
endif
In the same function, so it doesnt stuff up my local variables. I know it's possible but I'm just starting with JASS so yeah
Also, can noone please try and convert me to vJASS, i've tried all i can and JNGP will not work.