-- Get objects from orxonox thisscript:addObject("TestEntity", "fallingguy") thisscript:addObject("FPSPlayer", "Player") dy = 0 randTime = 0 eventFinished = false randinit = false function RandTime() if not randinit then math.randomseed(os.clock()) randinit = true randTime = 8 * math.random() end end function fallDown(timestep) dy = dy + timestep thisX = fallingguy:getAbsCoorX() thisY = fallingguy:getAbsCoorY() thisZ = fallingguy:getAbsCoorZ() fallingguy:setAbsCoor(thisX, thisY - dy, thisZ) if thisY < -100 then eventFinished = true end end function tick(timestep) RandTime() if randTime > 0 then randTime = randTime - timestep else fallDown(timestep) end return eventFinished end