Changeset 3962 for data/branches/single_player_map/scripts
- Timestamp:
- Jun 30, 2006, 2:05:39 PM (18 years ago)
- Location:
- data/branches/single_player_map/scripts
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
data/branches/single_player_map/scripts/falldown.lua
r3945 r3962 27 27 randTime = randTime - timestep 28 28 else 29 io.write("Falldown called \n")29 --io.write("Falldown called \n") 30 30 fallDown(timestep) 31 31 end -
data/branches/single_player_map/scripts/guard.lua
r3951 r3962 4 4 playerInLock = false 5 5 hangarReached = false 6 7 height = 29 6 8 7 9 -- Returns the distance between (x1,x2,x3) and (y1,y2,y3) … … 27 29 if not routeOneProgrammed then 28 30 --io.write("Guard called \n") 29 guard:walkTo(-132, 29, 238.381805)30 guard:walkTo(-138.41, 29, 275.25)31 guard:walkTo(-143.70, 29, 275.35)32 guard:walkTo(-149.10, 29, 226.66)33 guard:walkTo(-149.10, 29, 196.83)34 guard:walkTo(-145.82, 29, 189.74)35 guard:walkTo(-138.48, 29, 184.28)36 guard:walkTo(35.48, 29, 191.28)37 guard:runTo(102, 29, 203.28)38 guard:runTo(164, 29, 245.28)31 guard:walkTo(-132, height, 238.381805) 32 guard:walkTo(-138.41, height, 275.25) 33 guard:walkTo(-143.70, height, 275.35) 34 guard:walkTo(-149.10, height, 226.66) 35 guard:walkTo(-149.10, height, 196.83) 36 guard:walkTo(-145.82, height, 189.74) 37 guard:walkTo(-138.48, height, 184.28) 38 guard:walkTo(35.48, height, 191.28) 39 guard:runTo(102, height, 203.28) 40 guard:runTo(164, height, 245.28) 39 41 40 42 routeOneProgrammed = true … … 53 55 54 56 if not exitRouteProgrammed then 55 guard:walkTo(-132, 29, 238.381805) 56 guard:walkTo(-138.41, 29, 275.25) 57 guard:walkTo(-143.70, 29, 275.35) 58 guard:walkTo(-149.10, 29, 226.66) 59 guard:walkTo(-149.10, 29, 196.83) 60 guard:walkTo(-145.82, 29, 189.74) 61 guard:walkTo(-138.48, 29, 184.28) 62 guard:walkTo(35.48, 29, 191.28) 63 guard:runTo(102, 29, 203.28) 64 guard:runTo(164, 29, 245.28) 57 58 guard:walkTo( 165.360611, height, 244.436813) 59 guard:walkTo( 164.003571, height, 254.198746) 60 guard:walkTo( 162.631683, height, 264.067474) 61 guard:walkTo( 162.096558, height, 274.944366) 62 guard:walkTo( 161.519516, height, 286.673370) 63 guard:walkTo( 161.098618, height, 295.228699) 64 guard:walkTo( 160.568466, height, 306.004486) 65 guard:walkTo( 160.151169, height, 314.486572) 66 guard:walkTo( 159.416641, height, 324.925232) 67 guard:walkTo( 158.700073, height, 335.108154) 68 guard:walkTo( 157.943298, height, 345.862610) 69 guard:walkTo( 157.418381, height, 356.131256) 70 guard:walkTo( 156.908035, height, 366.115417) 71 guard:walkTo( 156.940308, height, 377.467712) 72 guard:walkTo( 156.965408, height, 386.287933) 73 guard:walkTo( 156.924698, height, 394.296417) 74 guard:walkTo( 156.816116, height, 401.564911) 75 guard:walkTo( 156.147583, height, 446.314850) 76 guard:walkTo( 155.145660, height, 515.473877) 77 guard:walkTo( 148.450058, height, 524.572571) 78 guard:walkTo( 135.599609, height, 533.407166) 79 guard:walkTo( 119.772217, height, 539.609192) 80 guard:walkTo( 108.926720, height, 537.174927) 81 guard:walkTo( 100.885788, height, 524.737793) 82 guard:walkTo( 99.870834, height, 512.540100) 83 guard:walkTo( 108.219215, height, 502.064178) 65 84 66 85 exitRouteProgrammed = true … … 79 98 80 99 if not hangarRouteProgrammed then 81 guard:walkTo(-132, 29, 238.381805) 82 guard:walkTo(-138.41, 29, 275.25) 83 guard:walkTo(-143.70, 29, 275.35) 84 guard:walkTo(-149.10, 29, 226.66) 85 guard:walkTo(-149.10, 29, 196.83) 86 guard:walkTo(-145.82, 29, 189.74) 87 guard:walkTo(-138.48, 29, 184.28) 88 guard:walkTo(35.48, 29, 191.28) 89 guard:runTo(102, 29, 203.28) 90 guard:runTo(164, 29, 245.28) 91 100 guard:walkTo( 138.422943, height, 504.832733) 101 guard:walkTo( 188.685089, height, 509.034851) 102 guard:walkTo( 259.451904, height, 515.326111) 103 guard:walkTo( 351.655762, height, 519.210571) 104 guard:walkTo( 495.821381, height, 517.551392) 105 guard:walkTo( 650.267029, height, 516.826843) 106 guard:walkTo( 752.277100, height, 506.265289) 107 guard:walkTo( 780.652405, height, 397.283752) 108 guard:walkTo( 780.212830, height, 317.386017) 109 guard:walkTo( 778.699158, height, 241.875305) 110 guard:walkTo( 776.305542, height, 120.869957) 111 guard:walkTo( 774.626343, height, 26.204597) 112 guard:walkTo( 773.148804, height, -30.654911) 113 guard:walkTo( 771.164978, height, -106.990250) 114 guard:walkTo( 756.719971, height, -197.656296) 115 guard:walkTo( 730.690796, height, -269.808075) 116 guard:walkTo( 702.250854, height, -341.732147) 117 guard:walkTo( 681.786011, height, -393.487030) 118 guard:walkTo( 664.005981, height, -441.609131) 119 guard:walkTo( 655.612671, height, -523.194153) 120 guard:walkTo( 664.289978, height, -585.003540) 121 guard:walkTo( 670.221069, height, -645.366333) 122 guard:walkTo( 674.347290, height, -704.953674) 123 guard:walkTo( 677.495605, height, -750.421082) 124 guard:walkTo( 680.699280, height, -796.687073) 125 guard:walkTo( 686.407043, height, -879.117859) 126 guard:walkTo( 692.573364, height, -952.031555) 127 guard:walkTo( 701.940552, height, -1025.037964) 128 guard:walkTo( 710.218628, height, -1086.598389) 129 guard:walkTo( 719.834900, height, -1142.248779) 130 guard:walkTo( 731.087158, height, -1198.201538) 131 guard:walkTo( 745.157715, height, -1258.461182) 132 guard:walkTo( 753.189331, height, -1290.539551) 133 guard:walkTo( 763.940369, height, -1347.249268) 134 guard:walkTo( 768.509949, height, -1377.040039) 135 guard:walkTo( 770.845215, height, -1408.751953) 136 guard:walkTo( 770.785583, height, -1435.573608) 137 guard:walkTo( 765.031799, height, -1462.657593) 138 guard:walkTo( 753.982727, height, -1483.425415) 139 guard:walkTo( 735.194580, height, -1500.978394) 140 guard:walkTo( 707.312500, height, -1514.814575) 141 guard:walkTo( 672.638550, height, -1522.803589) 142 guard:walkTo( 560.158936, height, -1530.277344) 143 guard:walkTo( 500.429626, height, -1532.241577) 144 guard:walkTo( 371.231262, height, -1535.953613) 145 guard:walkTo( 204.211609, height, -1539.026611) 146 guard:walkTo( 104.032593, height, -1546.350220) 147 guard:walkTo( 45.058315, height, -1550.720337) 148 guard:walkTo( 1.504358, height, -1574.713745) 149 guard:walkTo( -20.050890, height, -1627.849854) 150 guard:walkTo( -28.036245, height, -1674.240479) 151 guard:walkTo( -29.157598, height, -1702.924316) 152 guard:walkTo( -29.760004, height, -1730.014526) 153 guard:walkTo( -29.538343, height, -1759.887329) 154 guard:walkTo( -21.584003, height, -1790.162842) 155 guard:walkTo( -8.572795, height, -1823.067871) 156 guard:walkTo( 13.254844, height, -1861.705688) 92 157 hangarRouteProgrammed = true 93 158 end -
data/branches/single_player_map/scripts/prisoner.lua
r3954 r3962 10 10 randTime = 0 11 11 12 13 function dist( x1,x2,x3, y1,y2,y3 ) 14 15 return math.sqrt( (x1-y1)^2 + (x2-y2)^2 + (x3-y3)^2 ) 16 17 end 18 12 19 function observeGuard() 13 20 guardX = guard:getAbsCoorX() … … 28 35 if dist( playerX,playerY,playerZ,161.76,49,358.87 ) < 60 then 29 36 playerInLock = true 37 end 38 30 39 end 31 40 -
data/branches/single_player_map/scripts/secondguard.lua
r3954 r3962 26 26 function observePrisoner() 27 27 28 prisonerX = Prisoner:getAbsCoorX()29 prisonerY = Prisoner:getAbsCoorY()30 prisonerZ = Prisoner:getAbsCoorZ()28 prisonerX = prisoner:getAbsCoorX() 29 prisonerY = prisoner:getAbsCoorY() 30 prisonerZ = prisoner:getAbsCoorZ() 31 31 32 32 if dist( prisonerX,prisonerY,prisonerZ,161.76,49,358.87 ) < 60 then … … 40 40 41 41 if not cellProgrammed then 42 --io.write("Guard called \n") 43 secondguard:walkTo(-132, 29, 238.381805) 44 secondguard:walkTo(-138.41, 29, 275.25) 45 secondguard:walkTo(-143.70, 29, 275.35) 46 secondguard:walkTo(-149.10, 29, 226.66) 47 secondguard:walkTo(-149.10, 29, 196.83) 48 secondguard:walkTo(-145.82, 29, 189.74) 49 secondguard:walkTo(-138.48, 29, 184.28) 50 secondguard:walkTo(35.48, 29, 191.28) 51 secondguard:runTo(102, 29, 203.28) 52 secondguard:runTo(164, 29, 245.28) 42 53 43 54 44 cellProgrammed = true
Note: See TracChangeset
for help on using the changeset viewer.