Rev | Line | |
---|
[4555] | 1 | trigger = ScriptTrigger() -- Create the trigger |
---|
| 2 | trigger:setScript("cutscene.lua") -- Tell the trigger which script to call |
---|
| 3 | trigger:setFunction("tick") -- Tell the trigger which scriptfunction to call |
---|
| 4 | trigger:setActiveOnCreation(true) -- Let the trigger call the script as soon as it is created until |
---|
| 5 | |
---|
| 6 | -- Get objects from orxonox |
---|
| 7 | thisscript:addObject("CameraMan", "cameraManager") |
---|
| 8 | |
---|
| 9 | |
---|
| 10 | time = 0 |
---|
| 11 | cameraSwitched = false |
---|
| 12 | |
---|
| 13 | -- THE tick function |
---|
| 14 | |
---|
| 15 | function tick(timestep) |
---|
| 16 | time = time + timestep |
---|
| 17 | |
---|
| 18 | cameraManager:changeTarget( "CameraOne", "Planet", "Moon") |
---|
| 19 | cameraManager:setCam("CameraOne") |
---|
| 20 | cameraSwitched = true |
---|
| 21 | |
---|
| 22 | |
---|
| 23 | if time > 4 then |
---|
| 24 | --cameraManager:togglFade() |
---|
| 25 | return true |
---|
| 26 | end |
---|
| 27 | |
---|
| 28 | return false |
---|
| 29 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.