[4601] | 1 | -- Create the trigger |
---|
[4671] | 2 | trigger = ScriptTrigger() |
---|
| 3 | trigger:setName("maintrigger") |
---|
| 4 | trigger:setScript("spaceship_hangar.lua") |
---|
| 5 | trigger:setFunction("tick") |
---|
| 6 | trigger:setActiveOnCreation(true) |
---|
[4601] | 7 | |
---|
| 8 | triggerZero = ScriptTrigger() |
---|
| 9 | triggerZero:setScript("spaceship_hangar.lua") |
---|
[4671] | 10 | triggerZero:setFunction("startQuestThree") |
---|
| 11 | triggerZero:setAbsCoor(3211.242188, 62.026615, -4471.773926) |
---|
[4601] | 12 | triggerZero:setTarget("Player") |
---|
[4671] | 13 | triggerZero:setRadius(140) |
---|
[4603] | 14 | --triggerZero:setDebugDraw(true) |
---|
[4601] | 15 | |
---|
[4671] | 16 | |
---|
| 17 | |
---|
| 18 | triggerOne = ScriptTrigger() |
---|
| 19 | triggerOne:setScript("spaceship_hangar.lua") |
---|
| 20 | triggerOne:setFunction("startQuestTwo") |
---|
| 21 | triggerOne:setAbsCoor(3454.067383, 58.026615, -4117.536133) |
---|
| 22 | triggerOne:setTarget("Player") |
---|
| 23 | triggerOne:setRadius(140) |
---|
| 24 | |
---|
| 25 | |
---|
[4601] | 26 | thisscript:addObjectAsName("GameWorld", "Space Station 1B", "gameWorld") |
---|
[4671] | 27 | thisscript:addObject("QuestGUI", "First_Quest") |
---|
| 28 | thisscript:addObject("QuestGUI", "Second_Quest") |
---|
| 29 | thisscript:addObject("QuestGUI", "Third_Quest") |
---|
[4601] | 30 | |
---|
[4671] | 31 | firstQuestShowed = false |
---|
[4601] | 32 | |
---|
[4671] | 33 | function switchToVertical() |
---|
[4653] | 34 | if gameWorld:setNextStoryName( "Mission 1" ) then |
---|
[4601] | 35 | gameWorld:stop() |
---|
| 36 | end |
---|
[4671] | 37 | |
---|
| 38 | end |
---|
| 39 | |
---|
| 40 | function startQuestTwo(timestep) |
---|
| 41 | Second_Quest:startGUI() |
---|
[4601] | 42 | return true |
---|
| 43 | end |
---|
| 44 | |
---|
[4671] | 45 | function startQuestThree(timestep) |
---|
| 46 | Third_Quest:startGUI() |
---|
| 47 | return true |
---|
| 48 | end |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | |
---|
| 52 | function tick(timestep) |
---|
| 53 | |
---|
| 54 | if not firstQuestShowed then |
---|
| 55 | First_Quest:startGUI() |
---|
| 56 | firstQuestShowed = true |
---|
| 57 | end |
---|
| 58 | |
---|
| 59 | if Third_Quest:isActive() then |
---|
| 60 | switchToVertical() |
---|
| 61 | end |
---|
| 62 | |
---|
| 63 | return false |
---|
| 64 | end |
---|