Line | |
---|
1 | -- Get objects from orxonox |
---|
2 | thisscript:addObject("SpaceShip", "Player") |
---|
3 | thisscript:addObject("CameraMan", "cameraManager") |
---|
4 | thisscript:addObjectAsName("GameWorld", "Mission 1", "gameWorld") |
---|
5 | |
---|
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) |
---|
13 | |
---|
14 | triggerEndLevel = TimeTrigger() |
---|
15 | triggerEndLevel:setScript("vs1.lua") |
---|
16 | triggerEndLevel:setFunction("changeLevel") |
---|
17 | triggerEndLevel:setDelay(5) |
---|
18 | |
---|
19 | teststring = "asdf"; |
---|
20 | |
---|
21 | function fadeOut(timestep) |
---|
22 | cameraManager:toggleFade() |
---|
23 | print(teststring) |
---|
24 | triggerEndLevel:start() |
---|
25 | return true |
---|
26 | end |
---|
27 | |
---|
28 | function changeLevel(timestep) |
---|
29 | print("changelvl now\n\n\n\n\n\n") |
---|
30 | gameWorld:setNextStoryName("Moonstation") |
---|
31 | gameWorld:stop() |
---|
32 | return true |
---|
33 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.