Changeset 4671 for data/trunk/scripts/spacestation/spaceship_tower.lua
- Timestamp:
- Jan 30, 2007, 8:39:21 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
data/trunk/scripts/spacestation/spaceship_tower.lua
r4659 r4671 14 14 --triggerOne:setDebugDraw(true) 15 15 16 triggerTwo = ScriptTrigger() 17 triggerTwo:setScript("spaceship_tower.lua") 18 triggerTwo:setFunction("startThirdQuest") 19 triggerTwo:setTarget("Player") 20 triggerTwo:setTriggerParent("panicGuy") 21 triggerTwo:setRadius(70) 22 --triggerTwo:setDebugDraw(true) 16 23 17 24 -- Get objects from orxonox … … 19 26 thisscript:addObject("GenericNPC", "pedestrianOne") 20 27 thisscript:addObject("GenericNPC", "hangarguyOne") 28 thisscript:addObject("GenericNPC", "panicGuy") 21 29 thisscript:addObject("QuestGUI", "First_Quest") 22 30 thisscript:addObject("QuestGUI", "Second_Quest") 31 thisscript:addObject("QuestGUI", "Third_Quest") 23 32 24 33 … … 27 36 -- Globals 28 37 questOneStarted = false 29 38 barReached = false 39 runProg = true 30 40 31 41 -- pedestrian … … 166 176 167 177 178 -- pedestrian 179 panic = { } 180 --{ 181 function panic:tick(timestep) 182 183 if runProg and Player:getAbsCoorX() < 700 then 184 panicGuy:setVisibility(true) 185 panicGuy:runTo( 532.556641, 21.618149, 121.871323 ) 186 panicGuy:runTo( 544.452026, 21.618143, 50.025143 ) 187 188 runProg = false 189 end 190 191 end 192 193 --} 194 195 196 168 197 function startSecondQuest(timestep) 169 170 198 if First_Quest:isActive() then 171 199 Second_Quest:startGUI() 172 end173 174 200 return true 201 end 202 203 return false 204 end 205 206 207 function startThirdQuest(timestep) 208 209 if barReached then 210 Third_Quest:startGUI() 211 return true 212 end 213 214 return false 175 215 end 176 216 … … 182 222 183 223 if not questOneStarted then 224 panicGuy:setVisibility(false) 184 225 First_Quest:startGUI() 185 226 questOneStarted = true 186 227 end 187 228 229 if Player:getAbsCoorX() > 800 then 230 barReached = true 231 end 232 233 if barReached then 234 panic:tick(timestep) 235 end 188 236 189 237 pedestrian:tick(timestep) 190 238 hangarguy:tick(timestep) 191 239 240 192 241 return false 193 242 end
Note: See TracChangeset
for help on using the changeset viewer.