Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 3, 2006, 2:51:25 PM (19 years ago)
Author:
snellen
Message:

spaceship.lua implemented

File:
1 edited

Legend:

Unmodified
Added
Removed
  • data/branches/single_player_map/scripts/secondguard.lua

    r4056 r4057  
    1212hangarReached = false
    1313
    14 height = 100
     14height = 29
    1515
    1616-- Returns the distance between (x1,x2,x3) and (y1,y2,y3)
     
    3030
    3131end
     32
     33function observePlayer()
     34
     35guardX = guard:getAbsCoorX()
     36guardY = guard:getAbsCoorY()
     37guardZ = guard:getAbsCoorZ()
     38
     39playerX = Player:getAbsCoorX()
     40playerY = Player:getAbsCoorY()
     41playerZ = Player:getAbsCoorZ()
     42
     43if dist( guardX,guardY,guardZ,playerX, playerX, playerX) > 30 and hangarProgrammed then
     44 --secondguard:stop()
     45 guardStopped = true
     46end
     47
     48if dist( guardX,guardY,guardZ,playerX, playerX, playerX) < 30 and hangarProgrammed and guardStopped then
     49 --secondguard:continue()
     50 guardStopped = false
     51end
     52
     53end
     54
     55
    3256
    3357function observePrisoner()
     
    271295observePrisoner()
    272296observeGuard()
     297observePlayer()
    273298
    274299if not allOk then
Note: See TracChangeset for help on using the changeset viewer.