Hi,
I would like to make appearing an object after few seconds, but not with the "spawn" fonction, because the object already exists in the level but it is hidden (with hide(obj_number)
I tried to make it appear after 5 seconds using the Timer function, but it doesn't works correctly...
Take a look below.
If I'm right, the object is hidden first in "function timer_init" and shown using the variable "delay" after 5 seconds.
When I run this script, the object is shown from the start... and never hidden...
This only occurs using the Timer function with Show or Hide object.
Timer function works fine used with other functions like SetAnimation, PlayAnimation, PlaySound, CollisionOn, SetActivated...
Thanks to explain to me why it doesn't works with Show and Hide ???
THANKS !
------------------------------------------------------------
local delay = 5000 -- delai 5 secondes
function timer_init(e)
StartTimer(e)
Hide(e)
end
function timer_main(e)
if GetTimer(e) >= delay then
Show(e)
end
Prompt("Timer " .. GetTimer(e) .. " Delai " .. delay)
end
------------------------------------------------------------