LAAT/c drop ATTE script - remove ATTE spawn delay? (Solved)
Posted: Thu Jan 01, 2009 1:21 pm
I wanted to get the LAAT/c in my geo map I have the animation all working correctly but the atte spawns about 10 seconds after the LAAT/c "drops" it.
Here is the script is there anyway to fix this?
ScriptCB_SetGameRules("campaign")
onfirstspawn = OnCharacterSpawn(
function(character)
if IsCharacterHuman(character) then
ReleaseCharacterSpawn(onfirstspawn)
onfirstspawn = nil
ScriptCB_PlayInGameMusic("rep_fel_amb_obj1_3_explore")
start_timer = CreateTimer("start_timer")
SetTimerValue(start_timer, 2)
StartTimer(start_timer)
begin_objectives = OnTimerElapse(
function()
conquest:Start()
ReleaseTimerElapse(begin_objectives)
begin_objectives = nil
end,
start_timer
)
end
end)
SetProperty("rep_prop_atte", "MaxHealth", 5000000)
SetProperty("rep_prop_atte", "CurHealth", 5000000)
atte_swap = CreateTimer("swap")
SetTimerValue(atte_swap, 45)
PlayAnimationFromTo("lol",0.0,50)
StartTimer(atte_swap)
ShowTimer(atte_swap)
OnTimerElapse(
function(timer)
ShowMessageText("game.objectives.complete", ATT)
KillObject("rep_prop_atte")
SetProperty("atte_cp", "Team", 1)
ShowTimer(nil)
end,
atte_swap
)
I think the bolded line is the problem it sets the cp to 1 then spawns the vehicle however there is a delay anyone know how to get rid of that delay or bypass setting a cp to team 1 and just adding the vehicle automatically?
Here is the script is there anyway to fix this?
ScriptCB_SetGameRules("campaign")
onfirstspawn = OnCharacterSpawn(
function(character)
if IsCharacterHuman(character) then
ReleaseCharacterSpawn(onfirstspawn)
onfirstspawn = nil
ScriptCB_PlayInGameMusic("rep_fel_amb_obj1_3_explore")
start_timer = CreateTimer("start_timer")
SetTimerValue(start_timer, 2)
StartTimer(start_timer)
begin_objectives = OnTimerElapse(
function()
conquest:Start()
ReleaseTimerElapse(begin_objectives)
begin_objectives = nil
end,
start_timer
)
end
end)
SetProperty("rep_prop_atte", "MaxHealth", 5000000)
SetProperty("rep_prop_atte", "CurHealth", 5000000)
atte_swap = CreateTimer("swap")
SetTimerValue(atte_swap, 45)
PlayAnimationFromTo("lol",0.0,50)
StartTimer(atte_swap)
ShowTimer(atte_swap)
OnTimerElapse(
function(timer)
ShowMessageText("game.objectives.complete", ATT)
KillObject("rep_prop_atte")
SetProperty("atte_cp", "Team", 1)
ShowTimer(nil)
end,
atte_swap
)
I think the bolded line is the problem it sets the cp to 1 then spawns the vehicle however there is a delay anyone know how to get rid of that delay or bypass setting a cp to team 1 and just adding the vehicle automatically?