Topic: How change level?
Hi, How change level?
I write:
Text0 = getObject("Text0")
Entity1 = getObject("Entity1")
t1 = 0
startTimer1 = 0 -- timer off by default
timerInterval1 = 360 -- timer interval : here 4 seconds
timerLoop1 = 0 -- if you want the timer to loop, set timerLoop = 1
t2 = 0
startTimer2 = 0 -- timer off by default
timerInterval2 = 10 -- timer interval : here 4 seconds
timerLoop2 = 0 -- if you want the timer to loop, set timerLoop = 1
function onSceneUpdate()
setRotation(Text0, {180, 0, t1})
setRotation(Entity1, {0, 0, -t1})
if startTimer1 == 1 then
if t == timerInterval1 then
t = 0
if timerLoop1 == 0 then
startTimer1 = 0
end
end
end
if startTimer1 == 1 then
t1 = t1+1
end
setTextColor(Text0, {1, t2/10, t2/20, 1})
if startTimer2 == 1 then
if t2 == timerInterval2 then
t2 = 0
if timerLoop2 == 0 then
startTimer2 = 0
end
end
end
if startTimer2 == 1 then
t2 = t2+1
end
startTimer1 = 1
startTimer2 = 1
if isKeyPressed("ENTER") then
loadLevel("levels/2.level")
end
end
and get an error:
nww@nww:~/maratiscar$ ./MaratisPlayer maratiscar.mproj
GL_VERSION : 3.3.0 NVIDIA 295.40
Ошибка сегментирования (core dumped)
Last edited by nww100 (2012-07-08 18:44:28)