Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/trunk/scripts/spacestation/spaceship_hangar.lua @ 4804

Last change on this file since 4804 was 4765, checked in by snellen, 18 years ago

adapted all the scripts to the new trunk

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