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/guard.lua

    r4056 r4057  
    88playerInLock = false
    99hangarReached = false
    10 
    11 height = 80
     10guardStopped = false
     11
     12height = 29
    1213
    1314-- Returns the distance between (x1,x2,x3) and (y1,y2,y3)
     
    1819
    1920function observePlayer()
     21
     22guardX = guard:getAbsCoorX()
     23guardY = guard:getAbsCoorY()
     24guardZ = guard:getAbsCoorZ()
     25
    2026playerX = Player:getAbsCoorX()
    2127playerY = Player:getAbsCoorY()
    2228playerZ = Player:getAbsCoorZ()
     29
     30if dist( guardX,guardY,guardZ,playerX, playerX, playerX) > 30 and hangarRouteProgrammed then
     31 --guard:stop()
     32 guardStopped = true
     33end
     34
     35if dist( guardX,guardY,guardZ,playerX, playerX, playerX) < 30 and hangarRouteProgrammed and guardStopped then
     36 --guard:continue()
     37 guardStopped = false
     38end
    2339
    2440if dist( playerX,playerY,playerZ,167.361526,29,483.163818 ) < 60 then
Note: See TracChangeset for help on using the changeset viewer.