Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 29, 2006, 6:47:23 PM (18 years ago)
Author:
snellen
Message:

added some npcs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • data/branches/single_player_map/scripts/secondguard.lua

    r3946 r3951  
    11-- Global Variables
    22allOk = true
    3 standing = false
     3cellReached = false
    44guidePositionReached = false
    55prisonerReachedLock = false
     
    1515
    1616
    17 function alert(timestep)
     17function observeGuard()
     18guardX = guard:getAbsCoorX()
     19guardY = guard:getAbsCoorY()
     20guardZ = guard:getAbsCoorZ()
     21
     22if dist( guardX,guardY,guardZ,161.76,49,358.87 ) < 60 then
    1823allOk = false
    19 return true
     24end
     25
    2026end
    2127
    2228function observePrisoner()
    2329
    24 --prisonerX = Prisoner:getAbsCoorX()
    25 --prisonerY = Prisoner:getAbsCoorY()
    26 --prisonerZ = Prisoner:getAbsCoorZ()
     30prisonerX = Prisoner:getAbsCoorX()
     31prisonerY = Prisoner:getAbsCoorY()
     32prisonerZ = Prisoner:getAbsCoorZ()
     33
     34if dist( prisonerX,prisonerY,prisonerZ,161.76,49,358.87 ) < 60 then
     35prisonerReachedLock = true
     36end
    2737
    2838end
    2939
    30 function standUp(timestep)
     40
     41function goToCell(timestep)
    3142
    3243return false
     
    4960
    5061if not allOk then
    51 standing = standUp(timestep)
     62cellReached = goToCell(timestep)
    5263end
    5364
    54 if standing and not guidePositionReached then
     65if cellReached and not guidePositionReached then
    5566guidePositionReached = goToGuidePosition(timestep)
    5667end
    57 
    5868
    5969if guidePositionReached and prisonerReachedLock then
Note: See TracChangeset for help on using the changeset viewer.