Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 19, 2007, 5:20:15 PM (17 years ago)
Author:
snellen
Message:

some enemies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • data/trunk/scripts/vertical_scroller/vs1.lua

    r4899 r4902  
     1--register classes
     2thisscript:registerClass("Explosion")
    13-- Get objects from orxonox
    24thisscript:addObject("SpaceShip", "Player")
     
    68triggerFadeOut = SpaceTrigger()
    79triggerFadeOut:setScript("vs1.lua")
    8 triggerFadeOut:setFunction("fadeOut")
    9 triggerFadeOut:setRadius(250)
     10triggerFadeOut:setFunction("explodeSpaceship")
     11triggerFadeOut:setRadius(280)
    1012triggerFadeOut:setTarget("Player")
    1113triggerFadeOut:setAbsCoor(3610, 116, -656)
    1214triggerFadeOut:setDebugDraw(true)
     15
     16triggerSwitchCam = SpaceTrigger()
     17triggerSwitchCam:setScript("vs1.lua")
     18triggerSwitchCam:setFunction("switchCam")
     19triggerSwitchCam:setRadius(300)
     20triggerSwitchCam:setTarget("Player")
     21triggerSwitchCam:setAbsCoor(3610, 116, -656)
     22triggerSwitchCam:setDebugDraw(true)
    1323
    1424triggerEndLevel = TimeTrigger()
     
    1727triggerEndLevel:setDelay(5)
    1828
    19 teststring = "asdf";
     29--initialisation
     30explosion = Explosion()
     31cameraManager:changeTarget("cameraOne","SpaceShip", "Player")
    2032
    21 function fadeOut(timestep)
    22   cameraManager:toggleFade()
    23   print(teststring)
    24   triggerEndLevel:start()
    25   return true
    26 end
     33-- globals
     34boomSize = 100
     35
    2736
    2837function changeLevel(timestep)
    29   print("changelvl now\n\n\n\n\n\n")
    3038  gameWorld:setNextStoryName("Moonstation")
    3139  gameWorld:stop()
    3240  return true
    3341end
     42
     43
     44function explodeSpaceship(timestep)
     45        explosion:setAbsCoor(Player:getAbsCoorX(),Player:getAbsCoorY(),Player:getAbsCoorZ())
     46        explosion:explode(boomSize,boomSize,boomSize)
     47        boomSize = boomSize + 10
     48        if boomSize == 600 then
     49                  triggerEndLevel:start()
     50                  cameraManager:toggleFade()
     51                return true
     52        end
     53        return false
     54end
     55
     56function switchCam(timestep)
     57cameraManager:setCam("cameraOne")
     58cameraManager:jumpCurrCam(3604.608398, 155.705444, -312.326019)
     59return true
     60end
Note: See TracChangeset for help on using the changeset viewer.