Thanks that worked now I think ill manage with the second part making the elevator go down
EDIT: I failed.
Code: Select all
timer1 = CreateTimer("timer1")
SetTimerValue(timer1, 1.5)
timer2 = CreateTimer("timer2")
SetTimerValue(timer2, 2.0)
animateobja = OnObjectKill(
function(object, killer)
if GetEntityName(object) == "elevatorconsole" then
PlayAnimation("elevator_open")
StartTimer ("timer1")
testfunction = OnTimerElapse(
function(timer, timer1)
PauseAnimation("elevator_open")
end,
"timer1"
)
end
end
)
ActivateRegion("doortrigger2")
testfunction2 = OnEnterRegion (
function (enter_region, player)
if IsCharacterHuman(player) then
PlayAnimation ("elevator_close")
StartTimer ("timer1")
end
end,
"doortrigger2"
)
testfunction3 = OnTimerElapse (
function (timer, timer1)
PauseAnimation ("elevator_close")
PlayAnimation ("elevator_down")
StartTimer("timer2")
end,
"timer1"
)
testfunction4 = OnTimerElapse (
function (timer, timer2)
PauseAnimation ("elevator_down")
RewindAnimation ("elevator_open")
PlayAnimation ("elevator_open")
StartTimer("timer1")
end,
"timer2"
)
testfunction5 = OnTimerElapse (
function (timer, timer1)
PauseAnimation ("elevator_open")
end,
"timer1"
)
Ok so heres what I did for the second part. What happens is when I destroy the console the elevator opens but then immediately goes down, while the door becomes half transparent and flashy its really weird... What did I do wrong this time??