Rev | Line | |
---|
[4608] | 1 | -- Get objects from orxonox |
---|
| 2 | thisscript:addObject("SpaceShip", "Player") |
---|
| 3 | thisscript:addObject("CameraMan", "cameraManager") |
---|
[4899] | 4 | thisscript:addObjectAsName("GameWorld", "Mission 1", "gameWorld") |
---|
[4694] | 5 | |
---|
[4899] | 6 | triggerFadeOut = SpaceTrigger() |
---|
| 7 | triggerFadeOut:setScript("vs1.lua") |
---|
| 8 | triggerFadeOut:setFunction("fadeOut") |
---|
| 9 | triggerFadeOut:setRadius(250) |
---|
| 10 | triggerFadeOut:setTarget("Player") |
---|
| 11 | triggerFadeOut:setAbsCoor(3610, 116, -656) |
---|
| 12 | triggerFadeOut:setDebugDraw(true) |
---|
[4722] | 13 | |
---|
[4899] | 14 | triggerEndLevel = TimeTrigger() |
---|
| 15 | triggerEndLevel:setScript("vs1.lua") |
---|
| 16 | triggerEndLevel:setFunction("changeLevel") |
---|
| 17 | triggerEndLevel:setDelay(5) |
---|
[4722] | 18 | |
---|
[4899] | 19 | teststring = "asdf"; |
---|
[4722] | 20 | |
---|
[4899] | 21 | function fadeOut(timestep) |
---|
| 22 | cameraManager:toggleFade() |
---|
| 23 | print(teststring) |
---|
| 24 | triggerEndLevel:start() |
---|
| 25 | return true |
---|
[4608] | 26 | end |
---|
| 27 | |
---|
[4899] | 28 | function changeLevel(timestep) |
---|
| 29 | print("changelvl now\n\n\n\n\n\n") |
---|
| 30 | gameWorld:setNextStoryName("Moonstation") |
---|
| 31 | gameWorld:stop() |
---|
| 32 | return true |
---|
[4682] | 33 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.