Line | |
---|
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:setCam("CameraOne") |
---|
19 | cameraManager:changeCurrTarget( "Planet", "Moon") |
---|
20 | return true |
---|
21 | |
---|
22 | --if time > 2 and not cameraSwitched then |
---|
23 | --cameraSwitched = true |
---|
24 | --end |
---|
25 | |
---|
26 | --if time > 4 then |
---|
27 | ---cameraManager:togglFade() |
---|
28 | --return true |
---|
29 | --end |
---|
30 | |
---|
31 | --return false |
---|
32 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.