Page 1 of 1

LAAT/c drop ATTE script - remove ATTE spawn delay? (Solved)

Posted: Thu Jan 01, 2009 1:21 pm
by YaNkFaN
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?

Re: scripting question

Posted: Thu Jan 01, 2009 2:14 pm
by Maveritchell
I assume this is just one long animation after which you spawn an AT-TE:
Just look at your vehicle spawn associated with the atte_cp. It probably has a 10-second spawn delay. Alternatively, you could just set that CP to spawn the AT-TE 10 seconds early (before you kill the prop object), but that's more of a workaround and not fixing the issue.

Re: scripting question

Posted: Thu Jan 01, 2009 2:27 pm
by YaNkFaN
thanks mav

--solved--