[4601] | 1 | -- Create the trigger |
---|
[4765] | 2 | trigger = TickTrigger() |
---|
[4671] | 3 | trigger:setName("maintrigger") |
---|
| 4 | trigger:setScript("spaceship_hangar.lua") |
---|
| 5 | trigger:setFunction("tick") |
---|
[4765] | 6 | |
---|
[4601] | 7 | |
---|
[4765] | 8 | triggerZero = SpaceTrigger() |
---|
[4601] | 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 | |
---|
[4765] | 18 | triggerOne = SpaceTrigger() |
---|
[4671] | 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 |
---|