Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 30, 2007, 8:39:21 PM (18 years ago)
Author:
snellen
Message:

Added quests to spacestation hangar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • data/trunk/scripts/spacestation/spaceship_tower.lua

    r4659 r4671  
    1414--triggerOne:setDebugDraw(true)
    1515
     16triggerTwo = ScriptTrigger()
     17triggerTwo:setScript("spaceship_tower.lua")
     18triggerTwo:setFunction("startThirdQuest")
     19triggerTwo:setTarget("Player")
     20triggerTwo:setTriggerParent("panicGuy")
     21triggerTwo:setRadius(70)
     22--triggerTwo:setDebugDraw(true)
    1623
    1724-- Get objects from orxonox
     
    1926thisscript:addObject("GenericNPC", "pedestrianOne")
    2027thisscript:addObject("GenericNPC", "hangarguyOne")
     28thisscript:addObject("GenericNPC", "panicGuy")
    2129thisscript:addObject("QuestGUI", "First_Quest")
    2230thisscript:addObject("QuestGUI", "Second_Quest")
     31thisscript:addObject("QuestGUI", "Third_Quest")
    2332
    2433
     
    2736-- Globals
    2837questOneStarted = false
    29 
     38barReached = false
     39runProg = true
    3040
    3141-- pedestrian
     
    166176
    167177
     178-- pedestrian
     179panic = { }
     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
     189end
     190
     191 end
     192
     193--}
     194
     195
     196
    168197function startSecondQuest(timestep)
    169 
    170198if First_Quest:isActive() then
    171199Second_Quest:startGUI()
    172 end
    173 
    174200return true
     201end
     202
     203return false
     204end
     205
     206
     207function startThirdQuest(timestep)
     208
     209if barReached then
     210Third_Quest:startGUI()
     211return true
     212end
     213
     214return false
    175215end
    176216
     
    182222
    183223if not questOneStarted then
     224panicGuy:setVisibility(false)
    184225First_Quest:startGUI()
    185226questOneStarted = true
    186227end
    187228
     229if Player:getAbsCoorX() > 800 then
     230barReached = true
     231end
     232
     233if barReached then
     234panic:tick(timestep)
     235end
    188236
    189237pedestrian:tick(timestep)
    190238hangarguy:tick(timestep)
    191239
     240
    192241return false
    193242end
Note: See TracChangeset for help on using the changeset viewer.