Changeset 4066 for data/branches/single_player_map/scripts/guard.lua
- Timestamp:
- Jul 3, 2006, 5:30:14 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
data/branches/single_player_map/scripts/guard.lua
r4063 r4066 8 8 playerInLock = false 9 9 hangarReached = false 10 guardStopped = false11 12 height = 3510 guardStopped = true 11 12 height = 29 13 13 14 14 -- Returns the distance between (x1,x2,x3) and (y1,y2,y3) … … 28 28 playerZ = Player:getAbsCoorZ() 29 29 30 if dist( guardX,guardY,guardZ,playerX, playerX, playerX) > 30 and hangarRouteProgrammed then 31 --guard:stop() 30 31 distance = dist( guardX,guardY,guardZ,playerX, playerY, playerZ) 32 33 io.write(distance, " \n") 34 35 if dist( guardX,guardY,guardZ,playerX, playerY, playerZ) > 100 and hangarRouteProgrammed and not guardStopped then 36 io.write("guard stopped\n") 37 guard:stop() 32 38 guardStopped = true 33 39 end 34 40 35 if dist( guardX,guardY,guardZ,playerX, playerX, playerX) < 30 and hangarRouteProgrammed and guardStopped then 36 --guard:continue() 41 if dist( guardX,guardY,guardZ,playerX, playerY, playerZ) < 100 and hangarRouteProgrammed and guardStopped then 42 io.write("guard resumed") 43 guard:continue() 37 44 guardStopped = false 38 45 end … … 104 111 105 112 if not exitRouteProgrammed then 106 guard: walkTo( 162.096558, height, 274.944366)107 guard: walkTo( 161.519516, height, 286.673370)108 guard: walkTo( 161.098618, height, 295.228699)109 guard: walkTo( 160.568466, height, 306.004486)110 guard: walkTo( 160.151169, height, 314.486572)111 guard: walkTo( 159.416641, height, 324.925232)113 guard:runTo( 162.096558, height, 274.944366) 114 guard:runTo( 161.519516, height, 286.673370) 115 guard:runTo( 161.098618, height, 295.228699) 116 guard:runTo( 160.568466, height, 306.004486) 117 guard:runTo( 160.151169, height, 314.486572) 118 guard:runTo( 159.416641, height, 324.925232) 112 119 guard:walkTo( 158.700073, height, 335.108154) 113 120 guard:walkTo( 157.943298, height, 345.862610)
Note: See TracChangeset
for help on using the changeset viewer.