Changeset 4070 for data/branches/single_player_map/scripts/guard.lua
- Timestamp:
- Jul 3, 2006, 9:10:39 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
data/branches/single_player_map/scripts/guard.lua
r4067 r4070 10 10 guardStopped = false 11 11 12 height = 2912 height = 34 13 13 14 14 -- Returns the distance between (x1,x2,x3) and (y1,y2,y3) … … 31 31 distance = dist( guardX,guardY,guardZ,playerX, playerY, playerZ) 32 32 33 --io.write(distance, " \n") 34 35 if dist( guardX,guardY,guardZ,playerX, playerY, playerZ) > 150 and hangarRouteProgrammed and not guardStopped then 36 io.write("guard stopped\n") 33 if distance > 250 and hangarRouteProgrammed and not guardStopped then 37 34 guard:stop() 38 35 guardStopped = true 39 36 end 40 37 41 if dist( guardX,guardY,guardZ,playerX, playerY, playerZ) < 150 and hangarRouteProgrammed and guardStopped then 42 io.write("guard resumed\n") 38 if distance < 250 and hangarRouteProgrammed and guardStopped then 43 39 guard:resume() 44 40 guardStopped = false 45 41 end 46 42 47 if dist( playerX,playerY,playerZ,167.361526,29,483.163818 ) < 60 then43 if dist( playerX,playerY,playerZ,167.361526,29,483.163818 ) < 200 then 48 44 playerInLock = true 49 45 end … … 150 146 151 147 if not hangarRouteProgrammed and playerInLock then 152 guard:walkTo( 120.981117, height, 503.008972) 148 153 149 guard:walkTo( 133.354797, height, 504.669128) 154 150 guard:walkTo( 147.490158, height, 507.034393)
Note: See TracChangeset
for help on using the changeset viewer.