Changeset 3951 for data/branches/single_player_map/scripts/secondguard.lua
- Timestamp:
- Jun 29, 2006, 6:47:23 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
data/branches/single_player_map/scripts/secondguard.lua
r3946 r3951 1 1 -- Global Variables 2 2 allOk = true 3 standing= false3 cellReached = false 4 4 guidePositionReached = false 5 5 prisonerReachedLock = false … … 15 15 16 16 17 function alert(timestep) 17 function observeGuard() 18 guardX = guard:getAbsCoorX() 19 guardY = guard:getAbsCoorY() 20 guardZ = guard:getAbsCoorZ() 21 22 if dist( guardX,guardY,guardZ,161.76,49,358.87 ) < 60 then 18 23 allOk = false 19 return true 24 end 25 20 26 end 21 27 22 28 function observePrisoner() 23 29 24 --prisonerX = Prisoner:getAbsCoorX() 25 --prisonerY = Prisoner:getAbsCoorY() 26 --prisonerZ = Prisoner:getAbsCoorZ() 30 prisonerX = Prisoner:getAbsCoorX() 31 prisonerY = Prisoner:getAbsCoorY() 32 prisonerZ = Prisoner:getAbsCoorZ() 33 34 if dist( prisonerX,prisonerY,prisonerZ,161.76,49,358.87 ) < 60 then 35 prisonerReachedLock = true 36 end 27 37 28 38 end 29 39 30 function standUp(timestep) 40 41 function goToCell(timestep) 31 42 32 43 return false … … 49 60 50 61 if not allOk then 51 standing = standUp(timestep)62 cellReached = goToCell(timestep) 52 63 end 53 64 54 if standingand not guidePositionReached then65 if cellReached and not guidePositionReached then 55 66 guidePositionReached = goToGuidePosition(timestep) 56 67 end 57 58 68 59 69 if guidePositionReached and prisonerReachedLock then
Note: See TracChangeset
for help on using the changeset viewer.