Changeset 4057
- Timestamp:
- Jul 3, 2006, 2:51:25 PM (18 years ago)
- Location:
- data/branches/single_player_map/scripts
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
data/branches/single_player_map/scripts/falldown.lua
r4056 r4057 19 19 20 20 function fallDown(timestep) 21 dy = dy + timestep*0. 0121 dy = dy + timestep*0.1 22 22 thisX = fallingguy:getAbsCoorX() 23 23 thisY = fallingguy:getAbsCoorY() -
data/branches/single_player_map/scripts/guard.lua
r4056 r4057 8 8 playerInLock = false 9 9 hangarReached = false 10 11 height = 80 10 guardStopped = false 11 12 height = 29 12 13 13 14 -- Returns the distance between (x1,x2,x3) and (y1,y2,y3) … … 18 19 19 20 function observePlayer() 21 22 guardX = guard:getAbsCoorX() 23 guardY = guard:getAbsCoorY() 24 guardZ = guard:getAbsCoorZ() 25 20 26 playerX = Player:getAbsCoorX() 21 27 playerY = Player:getAbsCoorY() 22 28 playerZ = Player:getAbsCoorZ() 29 30 if dist( guardX,guardY,guardZ,playerX, playerX, playerX) > 30 and hangarRouteProgrammed then 31 --guard:stop() 32 guardStopped = true 33 end 34 35 if dist( guardX,guardY,guardZ,playerX, playerX, playerX) < 30 and hangarRouteProgrammed and guardStopped then 36 --guard:continue() 37 guardStopped = false 38 end 23 39 24 40 if dist( playerX,playerY,playerZ,167.361526,29,483.163818 ) < 60 then -
data/branches/single_player_map/scripts/prisoner.lua
r4056 r4057 3 3 thisscript:addObject("FPSPlayer", "Player") 4 4 thisscript:addObject("GenericNPC", "secondguard") 5 thisscript:addObject("GenericNPC","guard") 5 6 6 7 … … 15 16 16 17 randTime = 0 17 height = 8018 height = 29 18 19 19 20 … … 40 41 playerZ = Player:getAbsCoorZ() 41 42 43 44 guardX = guard:getAbsCoorX() 45 guardY = guard:getAbsCoorY() 46 guardZ = guard:getAbsCoorZ() 47 48 42 49 if dist( playerX,playerY,playerZ,161.76,49,358.87 ) < 60 then 43 50 playerInLock = true 44 51 end 45 52 46 end 47 48 53 54 if dist( guardX,guardY,guardZ,playerX, playerX, playerX) > 30 and hangarProgrammed then 55 --prisoner:stop() 56 guardStopped = true 57 end 58 59 if dist( guardX,guardY,guardZ,playerX, playerX, playerX) < 30 and hangarProgrammed and guardStopped then 60 --prisoner:continue() 61 guardStopped = false 62 end 63 64 end 49 65 50 66 walkProgrammed = false -
data/branches/single_player_map/scripts/secondguard.lua
r4056 r4057 12 12 hangarReached = false 13 13 14 height = 10014 height = 29 15 15 16 16 -- Returns the distance between (x1,x2,x3) and (y1,y2,y3) … … 30 30 31 31 end 32 33 function observePlayer() 34 35 guardX = guard:getAbsCoorX() 36 guardY = guard:getAbsCoorY() 37 guardZ = guard:getAbsCoorZ() 38 39 playerX = Player:getAbsCoorX() 40 playerY = Player:getAbsCoorY() 41 playerZ = Player:getAbsCoorZ() 42 43 if dist( guardX,guardY,guardZ,playerX, playerX, playerX) > 30 and hangarProgrammed then 44 --secondguard:stop() 45 guardStopped = true 46 end 47 48 if dist( guardX,guardY,guardZ,playerX, playerX, playerX) < 30 and hangarProgrammed and guardStopped then 49 --secondguard:continue() 50 guardStopped = false 51 end 52 53 end 54 55 32 56 33 57 function observePrisoner() … … 271 295 observePrisoner() 272 296 observeGuard() 297 observePlayer() 273 298 274 299 if not allOk then -
data/branches/single_player_map/scripts/spaceship.lua
r4056 r4057 126 126 127 127 if playerReachedTrigger then 128 moveToLaunchSite(timestep)128 --moveToLaunchSite(timestep) 129 129 end 130 130 131 131 if spaceshipLaunchReady then 132 launchSpaceShip(timestep)132 --launchSpaceShip(timestep) 133 133 end 134 134
Note: See TracChangeset
for help on using the changeset viewer.