Changeset 4080 for data/trunk/scripts
- Timestamp:
- Jul 4, 2006, 12:55:44 AM (19 years ago)
- Location:
- data/trunk/scripts
- Files:
-
- 1 deleted
- 6 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
data/trunk/scripts/falldown.lua
r3991 r4080 1 -- Get objects from orxonox 2 thisscript:addObject("TestEntity", "fallingguy") 3 thisscript:addObject("FPSPlayer", "Player") 4 1 5 dy = 0 2 6 randTime = 0 … … 9 13 math.randomseed(os.clock()) 10 14 randinit = true 11 randTime = 10* math.random()15 randTime = 8 * math.random() 12 16 end 13 17 end … … 15 19 16 20 function fallDown(timestep) 17 dy = dy + timestep *0.0121 dy = dy + timestep 18 22 thisX = fallingguy:getAbsCoorX() 19 23 thisY = fallingguy:getAbsCoorY() … … 22 26 fallingguy:setAbsCoor(thisX, thisY - dy, thisZ) 23 27 24 if thisY < 0 then28 if thisY < -100 then 25 29 eventFinished = true 26 30 end -
data/trunk/scripts/floorguy.lua
r3991 r4080 1 -- Get objects from orxonox 2 thisscript:addObject("GenericNPC", "floorguy") 3 thisscript:addObject("FPSPlayer", "Player") 1 4 2 5 programRoute = true 3 height = 806 height = -10 4 7 5 8 function tick(timestep) -
data/trunk/scripts/guard.lua
r4064 r4080 1 -- Get objects from orxonox 2 thisscript:addObject("GenericNPC","guard") 3 thisscript:addObject("FPSPlayer", "Player") 4 1 5 -- Global Variables 2 6 walkingRouteOne = true -- True if thestranger is walking route one … … 4 8 playerInLock = false 5 9 hangarReached = false 6 7 height = 29 10 guardStopped = false 11 12 height = 34 8 13 9 14 -- Returns the distance between (x1,x2,x3) and (y1,y2,y3) … … 14 19 15 20 function observePlayer() 21 22 guardX = guard:getAbsCoorX() 23 guardY = guard:getAbsCoorY() 24 guardZ = guard:getAbsCoorZ() 25 16 26 playerX = Player:getAbsCoorX() 17 27 playerY = Player:getAbsCoorY() 18 28 playerZ = Player:getAbsCoorZ() 19 29 20 if dist( playerX,playerY,playerZ,167.361526,29,483.163818 ) < 60 then 30 31 distance = dist( guardX,guardY,guardZ,playerX, playerY, playerZ) 32 33 if distance > 250 and hangarRouteProgrammed and not guardStopped then 34 guard:stop() 35 guardStopped = true 36 end 37 38 if distance < 250 and hangarRouteProgrammed and guardStopped then 39 guard:resume() 40 guardStopped = false 41 end 42 43 if dist( playerX,playerY,playerZ,167.361526,29,483.163818 ) < 200 then 21 44 playerInLock = true 22 45 end … … 84 107 85 108 if not exitRouteProgrammed then 86 guard:walkTo( 162.096558, height, 274.944366)87 guard:walkTo( 161.519516, height, 286.673370)88 guard:walkTo( 161.098618, height, 295.228699)89 guard:walkTo( 160.568466, height, 306.004486)90 guard: walkTo( 160.151169, height, 314.486572)91 guard: walkTo( 159.416641, height, 324.925232)109 --guard:runTo( 162.096558, height, 274.944366) 110 --guard:runTo( 161.519516, height, 286.673370) 111 --guard:runTo( 161.098618, height, 295.228699) 112 --guard:runTo( 160.568466, height, 306.004486) 113 guard:runTo( 160.151169, height, 314.486572) 114 guard:runTo( 159.416641, height, 324.925232) 92 115 guard:walkTo( 158.700073, height, 335.108154) 93 116 guard:walkTo( 157.943298, height, 345.862610) … … 123 146 124 147 if not hangarRouteProgrammed and playerInLock then 125 guard:walkTo( 138.422943, height, 504.832733) 126 guard:walkTo( 188.685089, height, 509.034851) 127 guard:walkTo( 259.451904, height, 515.326111) 128 guard:walkTo( 351.655762, height, 519.210571) 129 guard:walkTo( 495.821381, height, 517.551392) 130 guard:walkTo( 650.267029, height, 516.826843) 131 guard:walkTo( 752.277100, height, 506.265289) 132 guard:walkTo( 780.652405, height, 397.283752) 133 guard:walkTo( 780.212830, height, 317.386017) 134 guard:walkTo( 778.699158, height, 241.875305) 135 guard:walkTo( 776.305542, height, 120.869957) 136 guard:walkTo( 774.626343, height, 26.204597) 137 guard:walkTo( 773.148804, height, -30.654911) 138 guard:walkTo( 771.164978, height, -106.990250) 139 guard:walkTo( 756.719971, height, -197.656296) 140 guard:walkTo( 730.690796, height, -269.808075) 141 guard:walkTo( 702.250854, height, -341.732147) 142 guard:walkTo( 681.786011, height, -393.487030) 143 guard:walkTo( 664.005981, height, -441.609131) 144 guard:walkTo( 655.612671, height, -523.194153) 145 guard:walkTo( 664.289978, height, -585.003540) 146 guard:walkTo( 670.221069, height, -645.366333) 147 guard:walkTo( 674.347290, height, -704.953674) 148 guard:walkTo( 677.495605, height, -750.421082) 149 guard:walkTo( 680.699280, height, -796.687073) 150 guard:walkTo( 686.407043, height, -879.117859) 151 guard:walkTo( 692.573364, height, -952.031555) 152 guard:walkTo( 701.940552, height, -1025.037964) 153 guard:walkTo( 710.218628, height, -1086.598389) 154 guard:walkTo( 719.834900, height, -1142.248779) 155 guard:walkTo( 731.087158, height, -1198.201538) 156 guard:walkTo( 745.157715, height, -1258.461182) 157 guard:walkTo( 753.189331, height, -1290.539551) 158 guard:walkTo( 763.940369, height, -1347.249268) 159 guard:walkTo( 768.509949, height, -1377.040039) 160 guard:walkTo( 770.845215, height, -1408.751953) 161 guard:walkTo( 770.785583, height, -1435.573608) 162 guard:walkTo( 765.031799, height, -1462.657593) 163 guard:walkTo( 753.982727, height, -1483.425415) 164 guard:walkTo( 735.194580, height, -1500.978394) 165 guard:walkTo( 707.312500, height, -1514.814575) 166 guard:walkTo( 672.638550, height, -1522.803589) 167 guard:walkTo( 560.158936, height, -1530.277344) 168 guard:walkTo( 500.429626, height, -1532.241577) 169 guard:walkTo( 371.231262, height, -1535.953613) 170 guard:walkTo( 204.211609, height, -1539.026611) 171 guard:walkTo( 104.032593, height, -1546.350220) 172 guard:walkTo( 45.058315, height, -1550.720337) 173 guard:walkTo( 1.504358, height, -1574.713745) 174 guard:walkTo( -20.050890, height, -1627.849854) 175 guard:walkTo( -28.036245, height, -1674.240479) 176 guard:walkTo( -29.157598, height, -1702.924316) 177 guard:walkTo( -29.760004, height, -1730.014526) 178 guard:walkTo( -29.538343, height, -1759.887329) 179 guard:walkTo( -21.584003, height, -1790.162842) 180 guard:walkTo( -8.572795, height, -1823.067871) 181 guard:walkTo( 13.254844, height, -1861.705688) 148 149 guard:walkTo( 133.354797, height, 504.669128) 150 guard:walkTo( 147.490158, height, 507.034393) 151 guard:walkTo( 157.640610, height, 508.901001) 152 guard:walkTo( 168.830688, height, 510.958710) 153 guard:walkTo( 185.020630, height, 512.736206) 154 guard:walkTo( 201.232452, height, 513.413818) 155 guard:walkTo( 265.666138, height, 513.736023) 156 guard:walkTo( 362.377960, height, 515.575806) 157 guard:walkTo( 426.176392, height, 515.666748) 158 guard:walkTo( 500.031677, height, 515.197266) 159 guard:walkTo( 551.294250, height, 514.430237) 160 guard:walkTo( 604.974731, height, 515.106323) 161 guard:walkTo( 651.117920, height, 516.026550) 162 guard:walkTo( 664.581909, height, 516.295227) 163 guard:walkTo( 683.122803, height, 516.665100) 164 guard:walkTo( 694.547485, height, 516.892944) 165 guard:walkTo( 704.408569, height, 517.089539) 166 guard:walkTo( 714.413208, height, 517.289185) 167 guard:walkTo( 739.045288, height, 515.581970) 168 guard:walkTo( 763.904541, height, 497.281738) 169 guard:walkTo( 767.672791, height, 481.974457) 170 guard:walkTo( 769.436951, height, 468.704559) 171 guard:walkTo( 770.490967, height, 453.283386) 172 guard:walkTo( 771.185303, height, 435.960114) 173 guard:walkTo( 771.952820, height, 379.502045) 174 guard:walkTo( 771.938293, height, 310.049042) 175 guard:walkTo( 772.514526, height, 231.579498) 176 guard:walkTo( 773.601074, height, 135.177933) 177 guard:walkTo( 773.790771, height, 50.675163) 178 guard:walkTo( 773.316162, height, -36.961666) 179 guard:walkTo( 772.885986, height, -116.407944) 180 guard:walkTo( 772.841309, height, -124.651726) 181 guard:walkTo( 772.491333, height, -137.742279) 182 guard:walkTo( 770.644775, height, -153.245926) 183 guard:walkTo( 768.774414, height, -163.767120) 184 guard:walkTo( 766.336426, height, -174.224228) 185 guard:walkTo( 762.794128, height, -187.312271) 186 guard:walkTo( 733.548279, height, -274.004791) 187 guard:walkTo( 713.113647, height, -329.657959) 188 guard:walkTo( 694.801819, height, -379.530243) 189 guard:walkTo( 681.276062, height, -422.047028) 190 guard:walkTo( 672.579102, height, -458.540985) 191 guard:walkTo( 670.843384, height, -465.824615) 192 guard:walkTo( 669.948364, height, -480.910645) 193 guard:walkTo( 669.361511, height, -493.648529) 194 guard:walkTo( 669.686829, height, -501.598572) 195 guard:walkTo( 674.055664, height, -582.077637) 196 guard:walkTo( 676.046387, height, -630.403809) 197 guard:walkTo( 677.839050, height, -674.209534) 198 guard:walkTo( 680.754944, height, -765.965515) 199 guard:walkTo( 681.034180, height, -803.351135) 200 guard:walkTo( 680.088806, height, -844.069031) 201 guard:walkTo( 677.801514, height, -899.952148) 202 guard:walkTo( 675.205627, height, -950.496460) 203 guard:walkTo( 672.847778, height, -996.413574) 204 guard:walkTo( 676.204041, height, -1043.556274) 205 guard:walkTo( 691.304382, height, -1088.596558) 206 guard:walkTo( 705.101318, height, -1128.320312) 207 guard:walkTo( 720.476013, height, -1164.364380) 208 guard:walkTo( 729.216797, height, -1183.948364) 209 guard:walkTo( 740.145203, height, -1212.598267) 210 guard:walkTo( 746.547363, height, -1238.340576) 211 guard:walkTo( 756.866211, height, -1280.605347) 212 guard:walkTo( 763.380554, height, -1314.622314) 213 guard:walkTo( 768.731506, height, -1347.977539) 214 guard:walkTo( 772.446655, height, -1381.641479) 215 guard:walkTo( 772.721069, height, -1421.184937) 216 guard:walkTo( 772.414734, height, -1457.349121) 217 guard:walkTo( 772.803284, height, -1489.560913) 218 182 219 hangarRouteProgrammed = true 183 220 end -
data/trunk/scripts/prisoner.lua
r3991 r4080 1 -- Get objects from orxonox 2 thisscript:addObject("GenericNPC", "prisoner") 3 thisscript:addObject("FPSPlayer", "Player") 4 thisscript:addObject("GenericNPC", "secondguard") 5 thisscript:addObject("GenericNPC","guard") 6 7 1 8 cellDoorOpened = false 2 9 walkinCellFinished = false … … 7 14 spaceShipEntered = false 8 15 playerInLock = false 16 guardStopped = false 9 17 10 18 randTime = 0 11 height = 8019 height = 34 12 20 13 21 … … 34 42 playerZ = Player:getAbsCoorZ() 35 43 36 if dist( playerX,playerY,playerZ,161.76,49,358.87 ) < 60 then 44 45 guardX = guard:getAbsCoorX() 46 guardY = guard:getAbsCoorY() 47 guardZ = guard:getAbsCoorZ() 48 49 distance = dist( guardX,guardY,guardZ,playerX, playerY, playerZ) 50 51 if dist( playerX,playerY,playerZ,161.76,49,358.87 ) < 100 then 37 52 playerInLock = true 38 53 end 39 54 40 end 41 42 55 56 if distance > 250 and hangarRouteProgrammed and not guardStopped then 57 prisoner:stop() 58 guardStopped = true 59 end 60 61 if distance < 250 and hangarRouteProgrammed and guardStopped then 62 prisoner:resume() 63 guardStopped = false 64 end 65 66 end 43 67 44 68 walkProgrammed = false … … 106 130 prisoner:walkTo( 153.191757, height, 253.635788) 107 131 prisoner:walkTo( 153.191757, height, 253.635788) 132 prisoner:walkTo( 151.838257, height, 257.185974) 133 prisoner:walkTo( 153.967865, height, 270.535095) 134 prisoner:walkTo( 156.288605, height, 284.582123) 135 prisoner:walkTo( 158.034988, height, 300.072937) 136 prisoner:walkTo( 158.817184, height, 311.973724) 137 prisoner:walkTo( 159.794891, height, 326.848816) 138 prisoner:walkTo( 160.789093, height, 342.474060) 139 prisoner:walkTo( 161.391815, height, 357.817505) 140 prisoner:walkTo( 162.055618, height, 374.715668) 141 prisoner:walkTo( 161.595901, height, 389.146759) 142 prisoner:walkTo( 160.607056, height, 407.092896) 143 prisoner:walkTo( 160.508041, height, 416.996307) 144 108 145 exitProgrammed = true 109 146 end … … 124 161 125 162 if not hangarRouteProgrammed and playerInLock then 126 prisoner:walkTo( 149.255554, height, 253.358582) 127 prisoner:walkTo( 155.679886, height, 274.126282) 128 prisoner:walkTo( 157.556641, height, 285.543640) 129 prisoner:walkTo( 159.016068, height, 294.552338) 130 prisoner:walkTo( 160.234924, height, 303.494812) 131 prisoner:walkTo( 161.399475, height, 313.532013) 132 prisoner:walkTo( 162.218994, height, 323.290924) 133 prisoner:walkTo( 162.030823, height, 335.226715) 134 prisoner:walkTo( 161.351410, height, 378.328094) 135 prisoner:walkTo( 161.183487, height, 388.983093) 136 prisoner:walkTo( 160.590225, height, 426.615540) 137 prisoner:walkTo( 160.313049, height, 444.198425) 138 prisoner:walkTo( 160.410721, height, 454.192413) 139 prisoner:walkTo( 161.796692, height, 465.085663) 140 prisoner:walkTo( 163.096069, height, 474.038086) 141 prisoner:walkTo( 165.596329, height, 485.415924) 142 prisoner:walkTo( 167.407303, height, 493.229279) 143 prisoner:walkTo( 169.595749, height, 499.048309) 144 prisoner:walkTo( 173.485214, height, 504.383026) 145 prisoner:walkTo( 182.131546, height, 510.774567) 146 prisoner:walkTo( 187.788422, height, 512.870789) 147 prisoner:walkTo( 196.524994, height, 514.751892) 148 prisoner:walkTo( 205.403473, height, 515.840271) 149 prisoner:walkTo( 205.403473, height, 515.840271) 150 prisoner:walkTo( 220.813049, height, 515.886658) 151 prisoner:walkTo( 392.501221, height, 516.405579) 152 prisoner:walkTo( 441.405975, height, 516.502502) 153 prisoner:walkTo( 513.379517, height, 515.572266) 154 prisoner:walkTo( 586.638611, height, 514.625244) 155 prisoner:walkTo( 651.319214, height, 513.789246) 156 prisoner:walkTo( 680.890869, height, 513.406982) 157 prisoner:walkTo( 701.035828, height, 512.568359) 158 prisoner:walkTo( 716.025879, height, 510.741150) 159 prisoner:walkTo( 723.756042, height, 509.009583) 160 prisoner:walkTo( 733.522095, height, 504.761475) 161 prisoner:walkTo( 738.782104, height, 501.529327) 162 prisoner:walkTo( 744.840637, height, 496.154846) 163 prisoner:walkTo( 750.059875, height, 487.892670) 164 prisoner:walkTo( 753.419373, height, 477.053894) 165 prisoner:walkTo( 754.661743, height, 470.759735) 166 prisoner:walkTo( 765.877319, height, 397.575897) 167 prisoner:walkTo( 768.522522, height, 360.462250) 168 prisoner:walkTo( 769.531250, height, 326.195801) 169 prisoner:walkTo( 770.420532, height, 286.531830) 170 prisoner:walkTo( 769.840393, height, 238.220535) 171 prisoner:walkTo( 771.094543, height, 172.138474) 172 prisoner:walkTo( 772.765137, height, 94.427673) 173 prisoner:walkTo( 771.779175, height, 62.094421) 174 prisoner:walkTo( 771.069336, height, 35.182930) 175 prisoner:walkTo( 769.679199, height, 4.657598) 176 prisoner:walkTo( 768.049377, height, -23.208313) 177 prisoner:walkTo( 766.691711, height, -54.609066) 178 prisoner:walkTo( 765.022156, height, -85.732277) 179 prisoner:walkTo( 763.538635, height, -110.417847) 180 prisoner:walkTo( 761.547485, height, -143.547577) 181 prisoner:walkTo( 760.982483, height, -147.543091) 182 prisoner:walkTo( 756.619934, height, -163.474457) 183 prisoner:walkTo( 751.651611, height, -180.926727) 184 prisoner:walkTo( 739.842041, height, -216.826782) 185 prisoner:walkTo( 716.715149, height, -294.878693) 186 prisoner:walkTo( 698.400146, height, -365.404541) 187 prisoner:walkTo( 692.199890, height, -396.395386) 188 prisoner:walkTo( 685.157593, height, -437.489929) 189 prisoner:walkTo( 678.175537, height, -475.680817) 190 prisoner:walkTo( 674.907837, height, -505.428314) 191 prisoner:walkTo( 674.588501, height, -531.477478) 192 prisoner:walkTo( 674.703308, height, -550.883789) 193 prisoner:walkTo( 675.315063, height, -567.361206) 194 prisoner:walkTo( 676.178345, height, -583.178772) 195 prisoner:walkTo( 678.579407, height, -638.655518) 196 prisoner:walkTo( 689.508118, height, -884.296448) 197 prisoner:walkTo( 690.749084, height, -917.750366) 198 prisoner:walkTo( 691.617676, height, -933.357056) 199 prisoner:walkTo( 696.260742, height, -972.685669) 200 prisoner:walkTo( 698.526550, height, -990.077209) 201 prisoner:walkTo( 705.576599, height, -1033.587646) 202 prisoner:walkTo( 719.388611, height, -1111.123657) 203 prisoner:walkTo( 724.847229, height, -1137.902832) 204 prisoner:walkTo( 729.118652, height, -1159.426514) 205 prisoner:walkTo( 733.152161, height, -1179.577393) 206 prisoner:walkTo( 737.474365, height, -1200.200684) 207 prisoner:walkTo( 740.808777, height, -1216.996216) 208 prisoner:walkTo( 748.261108, height, -1252.447021) 209 prisoner:walkTo( 748.648682, height, -1254.182983) 210 prisoner:walkTo( 752.690430, height, -1272.386719) 211 prisoner:walkTo( 755.726562, height, -1286.795532) 212 prisoner:walkTo( 758.134705, height, -1302.620117) 213 prisoner:walkTo( 759.900879, height, -1317.258911) 214 prisoner:walkTo( 760.405212, height, -1357.575195) 215 prisoner:walkTo( 760.203979, height, -1396.744385) 216 prisoner:walkTo( 759.262085, height, -1433.674316) 217 prisoner:walkTo( 758.916016, height, -1447.247437) 218 prisoner:walkTo( 757.844910, height, -1474.596558) 219 prisoner:walkTo( 756.331238, height, -1484.150269) 220 prisoner:walkTo( 754.152283, height, -1491.574585) 221 prisoner:walkTo( 750.549561, height, -1497.667236) 222 prisoner:walkTo( 741.115356, height, -1509.581177) 223 prisoner:walkTo( 733.292236, height, -1516.592407) 224 prisoner:walkTo( 724.755798, height, -1522.380615) 225 prisoner:walkTo( 712.188721, height, -1528.557495) 226 prisoner:walkTo( 707.279907, height, -1530.261841) 227 prisoner:walkTo( 698.749390, height, -1532.002563) 228 prisoner:walkTo( 681.891785, height, -1532.067871) 229 prisoner:walkTo( 625.072388, height, -1531.572266) 230 prisoner:walkTo( 501.572601, height, -1533.919922) 231 prisoner:walkTo( 237.189667, height, -1538.984985) 232 prisoner:walkTo( 146.071304, height, -1540.965820) 233 prisoner:walkTo( 88.186996, height, -1549.110962) 234 prisoner:walkTo( 85.715096, height, -1549.537842) 235 prisoner:walkTo( 66.997787, height, -1552.770264) 236 prisoner:walkTo( 52.632504, height, -1555.359009) 237 prisoner:walkTo( 38.350941, height, -1560.845459) 238 prisoner:walkTo( 26.315248, height, -1568.211060) 239 prisoner:walkTo( 15.210221, height, -1580.474121) 240 prisoner:walkTo( 6.527347, height, -1594.483398) 241 prisoner:walkTo( 3.175952, height, -1610.220093) 242 163 prisoner:walkTo( 162.624390, height, 425.402435) 164 prisoner:walkTo( 162.666931, height, 431.160980) 165 prisoner:walkTo( 162.708481, height, 436.786591) 166 prisoner:walkTo( 162.789124, height, 447.704620) 167 prisoner:walkTo( 162.863098, height, 457.719055) 168 prisoner:walkTo( 162.916428, height, 464.939545) 169 prisoner:walkTo( 162.975830, height, 472.982452) 170 prisoner:walkTo( 163.028259, height, 480.078857) 171 prisoner:walkTo( 164.319611, height, 491.340607) 172 prisoner:walkTo( 168.597382, height, 497.577728) 173 prisoner:walkTo( 186.090088, height, 506.772766) 174 prisoner:walkTo( 205.179825, height, 510.814911) 175 prisoner:walkTo( 210.280609, height, 511.704041) 176 prisoner:walkTo( 216.508865, height, 512.518982) 177 prisoner:walkTo( 224.820663, height, 513.199585) 178 prisoner:walkTo( 233.553589, height, 513.803711) 179 prisoner:walkTo( 275.363922, height, 514.931763) 180 prisoner:walkTo( 325.490265, height, 515.918945) 181 prisoner:walkTo( 365.214355, height, 516.691833) 182 prisoner:walkTo( 403.109619, height, 515.911804) 183 prisoner:walkTo( 464.696991, height, 514.644348) 184 prisoner:walkTo( 524.817627, height, 513.407104) 185 prisoner:walkTo( 565.836670, height, 512.870239) 186 prisoner:walkTo( 608.300232, height, 512.717957) 187 prisoner:walkTo( 634.151794, height, 512.625183) 188 prisoner:walkTo( 656.115234, height, 512.546570) 189 prisoner:walkTo( 679.420166, height, 512.462708) 190 prisoner:walkTo( 696.694702, height, 512.400635) 191 prisoner:walkTo( 712.425781, height, 512.344299) 192 prisoner:walkTo( 720.998474, height, 512.273193) 193 prisoner:walkTo( 733.098389, height, 512.028137) 194 prisoner:walkTo( 755.905273, height, 493.950714) 195 prisoner:walkTo( 758.626648, height, 472.345520) 196 prisoner:walkTo( 758.944458, height, 464.883545) 197 prisoner:walkTo( 760.426208, height, 404.809967) 198 prisoner:walkTo( 761.147827, height, 370.829987) 199 prisoner:walkTo( 761.848511, height, 337.836395) 200 prisoner:walkTo( 762.567932, height, 303.964020) 201 prisoner:walkTo( 763.293335, height, 269.808380) 202 prisoner:walkTo( 764.076294, height, 232.951477) 203 prisoner:walkTo( 765.114441, height, 184.070221) 204 prisoner:walkTo( 765.890076, height, 147.545258) 205 prisoner:walkTo( 766.753296, height, 106.902954) 206 prisoner:walkTo( 767.115967, height, 76.410255) 207 prisoner:walkTo( 766.648621, height, 39.034630) 208 prisoner:walkTo( 766.501282, height, 3.641552) 209 prisoner:walkTo( 766.630615, height, -25.998037) 210 prisoner:walkTo( 766.773560, height, -58.753052) 211 prisoner:walkTo( 766.897766, height, -87.277809) 212 prisoner:walkTo( 766.534546, height, -107.109718) 213 prisoner:walkTo( 764.282104, height, -135.666809) 214 prisoner:walkTo( 761.187439, height, -155.214981) 215 prisoner:walkTo( 756.769043, height, -180.015106) 216 prisoner:walkTo( 748.603821, height, -224.832336) 217 prisoner:walkTo( 741.901978, height, -259.153870) 218 prisoner:walkTo( 735.091492, height, -293.963196) 219 prisoner:walkTo( 726.579651, height, -329.477051) 220 prisoner:walkTo( 716.802002, height, -367.452911) 221 prisoner:walkTo( 706.963806, height, -402.515228) 222 prisoner:walkTo( 697.003357, height, -438.013824) 223 prisoner:walkTo( 688.261230, height, -471.035400) 224 prisoner:walkTo( 683.497986, height, -504.091461) 225 prisoner:walkTo( 681.250732, height, -528.006287) 226 prisoner:walkTo( 679.264771, height, -554.841125) 227 prisoner:walkTo( 678.647949, height, -582.533508) 228 prisoner:walkTo( 678.731018, height, -612.342407) 229 prisoner:walkTo( 678.873230, height, -663.699585) 230 prisoner:walkTo( 683.213135, height, -824.669922) 231 prisoner:walkTo( 691.796326, height, -993.215332) 232 prisoner:walkTo( 696.237244, height, -1045.909302) 233 prisoner:walkTo( 702.897461, height, -1072.645020) 234 prisoner:walkTo( 710.501160, height, -1095.735107) 235 prisoner:walkTo( 715.637573, height, -1111.740845) 236 prisoner:walkTo( 725.408020, height, -1144.843506) 237 prisoner:walkTo( 747.384888, height, -1223.670410) 238 prisoner:walkTo( 751.330872, height, -1238.939941) 239 prisoner:walkTo( 757.179504, height, -1262.104980) 240 prisoner:walkTo( 761.473145, height, -1287.161133) 241 prisoner:walkTo( 764.180298, height, -1311.035767) 242 prisoner:walkTo( 765.995178, height, -1339.139648) 243 prisoner:walkTo( 767.811340, height, -1381.138428) 244 prisoner:walkTo( 769.017273, height, -1409.277344) 245 prisoner:walkTo( 769.463684, height, -1430.375244) 246 prisoner:walkTo( 769.351685, height, -1451.503418) 243 247 hangarRouteProgrammed = true 244 248 end -
data/trunk/scripts/secondguard.lua
r3991 r4080 1 -- Get objects from orxonox 2 thisscript:addObject("GenericNPC", "secondguard") 3 thisscript:addObject("GenericNPC", "guard") 4 thisscript:addObject("FPSPlayer", "Player") 5 thisscript:addObject("GenericNPC", "prisoner") 6 1 7 -- Global Variables 2 8 allOk = true … … 5 11 prisonerReachedLock = false 6 12 hangarReached = false 7 8 height = 100 13 guardStopped = false 14 15 height = 90 9 16 10 17 -- Returns the distance between (x1,x2,x3) and (y1,y2,y3) … … 24 31 25 32 end 33 34 function observePlayer() 35 36 guardX = guard:getAbsCoorX() 37 guardY = guard:getAbsCoorY() 38 guardZ = guard:getAbsCoorZ() 39 40 playerX = Player:getAbsCoorX() 41 playerY = Player:getAbsCoorY() 42 playerZ = Player:getAbsCoorZ() 43 44 distance = dist( guardX,guardY,guardZ,playerX, playerY, playerZ) 45 46 if distance > 250 and hangarProgrammed and not guardStopped then 47 secondguard:stop() 48 guardStopped = true 49 end 50 51 if distance < 250 and hangarProgrammed and guardStopped then 52 secondguard:resume() 53 guardStopped = false 54 end 55 56 end 57 58 26 59 27 60 function observePrisoner() … … 103 136 104 137 if not guideProgrammed then 105 secondguard:walkTo( -104.757011, height, 171.200729)106 138 secondguard:walkTo( -100.266739, height, 171.345627) 107 139 secondguard:walkTo( -91.152046, height, 171.639709) … … 156 188 157 189 if not hangarProgrammed and prisonerReachedLock then 158 secondguard:walkTo( 194.153641, height, 244.749863) 159 secondguard:walkTo( 185.976517, height, 243.876404) 160 secondguard:walkTo( 179.645737, height, 243.505066) 161 secondguard:walkTo( 169.583008, height, 244.959457) 162 secondguard:walkTo( 161.454269, height, 249.422363) 163 secondguard:walkTo( 158.488998, height, 260.951874) 164 secondguard:walkTo( 158.228958, height, 272.121582) 165 secondguard:walkTo( 158.326004, height, 288.892853) 166 secondguard:walkTo( 158.389069, height, 299.792603) 167 secondguard:walkTo( 158.437561, height, 308.174896) 168 secondguard:walkTo( 158.479034, height, 315.341095) 169 secondguard:walkTo( 158.542801, height, 326.362518) 170 secondguard:walkTo( 158.621414, height, 339.950256) 171 secondguard:walkTo( 158.664566, height, 347.408417) 172 secondguard:walkTo( 158.737900, height, 360.080902) 173 secondguard:walkTo( 158.795013, height, 369.950531) 174 secondguard:walkTo( 158.857086, height, 380.676056) 175 secondguard:walkTo( 158.935440, height, 394.219177) 176 secondguard:walkTo( 158.984039, height, 402.618896) 177 secondguard:walkTo( 159.035522, height, 411.518219) 178 secondguard:walkTo( 159.089432, height, 420.837036) 179 secondguard:walkTo( 159.143021, height, 430.104523) 180 secondguard:walkTo( 159.203644, height, 440.579224) 181 secondguard:walkTo( 159.257263, height, 449.841522) 182 secondguard:walkTo( 159.304810, height, 458.057617) 183 secondguard:walkTo( 159.351440, height, 466.113068) 184 secondguard:walkTo( 160.060013, height, 482.411865) 185 secondguard:walkTo( 161.352600, height, 488.302185) 186 secondguard:walkTo( 174.254333, height, 503.439209) 187 secondguard:walkTo( 181.668213, height, 506.381195) 188 secondguard:walkTo( 189.177277, height, 508.729156) 189 secondguard:walkTo( 213.465332, height, 512.184326) 190 secondguard:walkTo( 223.635010, height, 512.920715) 191 secondguard:walkTo( 233.668503, height, 513.374512) 192 secondguard:walkTo( 448.702118, height, 512.187744) 193 secondguard:walkTo( 477.701050, height, 511.587463) 194 secondguard:walkTo( 525.645752, height, 511.139526) 195 secondguard:walkTo( 559.871216, height, 510.819763) 196 secondguard:walkTo( 596.801941, height, 510.632080) 197 secondguard:walkTo( 640.160767, height, 510.906891) 198 secondguard:walkTo( 684.745239, height, 510.429138) 199 secondguard:walkTo( 706.457214, height, 508.596039) 200 secondguard:walkTo( 718.750916, height, 507.558044) 201 secondguard:walkTo( 728.147827, height, 506.649780) 202 secondguard:walkTo( 743.581970, height, 502.185822) 203 secondguard:walkTo( 752.977234, height, 495.788635) 204 secondguard:walkTo( 759.201721, height, 483.407104) 205 secondguard:walkTo( 761.196167, height, 461.130798) 206 secondguard:walkTo( 762.335449, height, 398.166901) 207 secondguard:walkTo( 762.908691, height, 366.482208) 208 secondguard:walkTo( 763.506409, height, 333.456848) 209 secondguard:walkTo( 764.330750, height, 287.894409) 210 secondguard:walkTo( 767.909790, height, 194.910492) 211 secondguard:walkTo( 770.649231, height, 122.865265) 212 secondguard:walkTo( 770.102112, height, 44.244534) 213 secondguard:walkTo( 767.269775, height, -37.871273) 214 secondguard:walkTo( 763.989197, height, -132.996460) 215 secondguard:walkTo( 755.274231, height, -217.520859) 216 secondguard:walkTo( 739.636230, height, -307.869354) 217 secondguard:walkTo( 722.792725, height, -390.075226) 218 secondguard:walkTo( 702.582275, height, -475.155273) 219 secondguard:walkTo( 687.325012, height, -551.699036) 220 secondguard:walkTo( 681.873169, height, -628.924316) 221 secondguard:walkTo( 679.997437, height, -708.013794) 222 secondguard:walkTo( 681.080933, height, -772.108887) 223 secondguard:walkTo( 681.686035, height, -845.449524) 224 secondguard:walkTo( 682.188538, height, -906.434998) 225 secondguard:walkTo( 682.669800, height, -964.887085) 226 secondguard:walkTo( 684.829895, height, -1023.870117) 227 secondguard:walkTo( 690.728516, height, -1069.400146) 228 secondguard:walkTo( 695.965027, height, -1097.353149) 229 secondguard:walkTo( 701.128540, height, -1118.496216) 230 secondguard:walkTo( 708.865234, height, -1144.444214) 231 secondguard:walkTo( 724.753845, height, -1192.741699) 232 secondguard:walkTo( 737.665771, height, -1230.398560) 233 secondguard:walkTo( 741.520081, height, -1241.704712) 234 secondguard:walkTo( 756.537842, height, -1287.260376) 235 secondguard:walkTo( 764.046631, height, -1310.927002) 236 secondguard:walkTo( 769.402771, height, -1342.806152) 237 secondguard:walkTo( 772.158691, height, -1363.218750) 238 secondguard:walkTo( 772.599426, height, -1374.571899) 239 secondguard:walkTo( 771.977844, height, -1390.778320) 240 secondguard:walkTo( 771.576355, height, -1401.246826) 241 secondguard:walkTo( 770.982666, height, -1423.905273) 242 secondguard:walkTo( 770.952637, height, -1429.344360) 243 secondguard:walkTo( 770.912476, height, -1436.589966) 244 secondguard:walkTo( 770.880249, height, -1442.399536) 245 secondguard:walkTo( 770.847107, height, -1448.385376) 246 secondguard:walkTo( 770.785339, height, -1454.349365) 247 secondguard:walkTo( 768.858459, height, -1464.382080) 248 secondguard:walkTo( 767.639709, height, -1469.028809) 249 secondguard:walkTo( 765.099487, height, -1476.370605) 250 secondguard:walkTo( 762.003601, height, -1484.767456) 251 secondguard:walkTo( 758.787231, height, -1492.394287) 252 secondguard:walkTo( 755.135986, height, -1496.482788) 253 secondguard:walkTo( 752.631165, height, -1498.550049) 254 secondguard:walkTo( 746.021912, height, -1502.547485) 255 secondguard:walkTo( 739.376099, height, -1505.427734) 256 secondguard:walkTo( 731.429199, height, -1507.691162) 257 secondguard:walkTo( 719.202393, height, -1510.812622) 258 secondguard:walkTo( 716.329712, height, -1511.546021) 259 secondguard:walkTo( 711.301514, height, -1512.674438) 260 secondguard:walkTo( 702.414124, height, -1514.126099) 261 secondguard:walkTo( 695.724304, height, -1515.173218) 262 secondguard:walkTo( 576.522278, height, -1521.146362) 263 secondguard:walkTo( 542.552246, height, -1522.204712) 264 secondguard:walkTo( 499.907288, height, -1524.441772) 265 secondguard:walkTo( 461.101288, height, -1525.987915) 266 secondguard:walkTo( 417.154602, height, -1526.579102) 267 secondguard:walkTo( 367.752686, height, -1527.168091) 268 secondguard:walkTo( 322.209106, height, -1527.709473) 269 secondguard:walkTo( 273.998047, height, -1528.283447) 270 secondguard:walkTo( 234.330612, height, -1528.756348) 271 secondguard:walkTo( 188.730209, height, -1529.299438) 272 secondguard:walkTo( 140.078659, height, -1529.880249) 273 secondguard:walkTo( 105.882103, height, -1530.287109) 274 secondguard:walkTo( 71.860947, height, -1532.856079) 275 secondguard:walkTo( 39.777569, height, -1541.485596) 276 secondguard:walkTo( 13.919314, height, -1565.188110) 277 secondguard:walkTo( -0.632493, height, -1604.602783) 278 secondguard:walkTo( -2.103141, height, -1639.236694) 279 secondguard:walkTo( 0.498238, height, -1674.846558) 280 secondguard:walkTo( 2.861493, height, -1705.131958) 281 190 secondguard:walkTo( 198.984589, height, 243.144440) 191 secondguard:walkTo( 188.270493, height, 242.143143) 192 secondguard:walkTo( 185.177658, height, 241.854080) 193 secondguard:walkTo( 166.990906, height, 249.598251) 194 secondguard:walkTo( 160.702652, height, 251.610641) 195 secondguard:walkTo( 157.542480, height, 260.691101) 196 secondguard:walkTo( 158.720688, height, 285.526489) 197 secondguard:walkTo( 158.819519, height, 295.229065) 198 secondguard:walkTo( 158.941727, height, 307.225800) 199 secondguard:walkTo( 159.095718, height, 322.344818) 200 secondguard:walkTo( 159.248337, height, 332.535400) 201 secondguard:walkTo( 159.600082, height, 343.361420) 202 secondguard:walkTo( 160.006805, height, 355.880432) 203 secondguard:walkTo( 161.582108, height, 441.998688) 204 secondguard:walkTo( 161.650970, height, 447.407074) 205 secondguard:walkTo( 161.755173, height, 455.592651) 206 secondguard:walkTo( 162.311462, height, 471.569611) 207 secondguard:walkTo( 164.966690, height, 482.971222) 208 secondguard:walkTo( 168.578796, height, 492.256317) 209 secondguard:walkTo( 204.727936, height, 507.833527) 210 secondguard:walkTo( 212.031540, height, 508.235596) 211 secondguard:walkTo( 226.355484, height, 509.024170) 212 secondguard:walkTo( 441.672638, height, 512.266846) 213 secondguard:walkTo( 509.640350, height, 512.965515) 214 secondguard:walkTo( 576.208435, height, 512.614258) 215 secondguard:walkTo( 638.251770, height, 512.247986) 216 secondguard:walkTo( 667.897888, height, 512.072693) 217 secondguard:walkTo( 683.874451, height, 511.978363) 218 secondguard:walkTo( 693.377319, height, 511.922302) 219 secondguard:walkTo( 700.632446, height, 511.837494) 220 secondguard:walkTo( 703.564148, height, 511.713562) 221 secondguard:walkTo( 710.958313, height, 510.896362) 222 secondguard:walkTo( 724.824585, height, 502.160461) 223 secondguard:walkTo( 728.256226, height, 497.817627) 224 secondguard:walkTo( 734.361206, height, 484.795380) 225 secondguard:walkTo( 737.112488, height, 478.616089) 226 secondguard:walkTo( 740.696350, height, 470.796539) 227 secondguard:walkTo( 743.915833, height, 462.804688) 228 secondguard:walkTo( 750.241150, height, 438.829529) 229 secondguard:walkTo( 751.186340, height, 432.598022) 230 secondguard:walkTo( 751.977051, height, 427.385315) 231 secondguard:walkTo( 756.962708, height, 379.979919) 232 secondguard:walkTo( 759.845581, height, 337.377167) 233 secondguard:walkTo( 762.304626, height, 288.355713) 234 secondguard:walkTo( 764.125244, height, 248.893723) 235 secondguard:walkTo( 766.738892, height, 164.214142) 236 secondguard:walkTo( 767.405884, height, 116.896973) 237 secondguard:walkTo( 767.289917, height, 68.270233) 238 secondguard:walkTo( 767.680176, height, 31.480713) 239 secondguard:walkTo( 767.315247, height, -46.728809) 240 secondguard:walkTo( 767.634888, height, -85.314407) 241 secondguard:walkTo( 767.905823, height, -112.270973) 242 secondguard:walkTo( 767.716003, height, -134.956741) 243 secondguard:walkTo( 765.699829, height, -159.042664) 244 secondguard:walkTo( 762.026978, height, -178.211639) 245 secondguard:walkTo( 751.512512, height, -219.904297) 246 secondguard:walkTo( 735.898499, height, -277.525970) 247 secondguard:walkTo( 722.206055, height, -329.591888) 248 secondguard:walkTo( 709.354858, height, -383.514618) 249 secondguard:walkTo( 697.115295, height, -434.870483) 250 secondguard:walkTo( 685.142822, height, -485.212402) 251 secondguard:walkTo( 681.659058, height, -532.429504) 252 secondguard:walkTo( 679.999634, height, -581.595886) 253 secondguard:walkTo( 678.678101, height, -632.772156) 254 secondguard:walkTo( 678.162842, height, -682.753113) 255 secondguard:walkTo( 678.398376, height, -731.779053) 256 secondguard:walkTo( 679.124756, height, -782.160034) 257 secondguard:walkTo( 680.050781, height, -831.132141) 258 secondguard:walkTo( 678.395569, height, -877.242920) 259 secondguard:walkTo( 676.737793, height, -919.301819) 260 secondguard:walkTo( 676.191956, height, -962.443909) 261 secondguard:walkTo( 676.493774, height, -994.707703) 262 secondguard:walkTo( 677.446716, height, -1018.486389) 263 secondguard:walkTo( 681.286865, height, -1042.623901) 264 secondguard:walkTo( 685.302917, height, -1060.096436) 265 secondguard:walkTo( 692.212036, height, -1083.229370) 266 secondguard:walkTo( 698.947937, height, -1103.496826) 267 secondguard:walkTo( 710.392944, height, -1137.932617) 268 secondguard:walkTo( 719.685608, height, -1164.374634) 269 secondguard:walkTo( 728.124512, height, -1186.812622) 270 secondguard:walkTo( 746.270569, height, -1235.059082) 271 secondguard:walkTo( 754.436340, height, -1259.201660) 272 secondguard:walkTo( 760.588013, height, -1286.830933) 273 secondguard:walkTo( 765.026733, height, -1329.641113) 274 secondguard:walkTo( 765.849609, height, -1362.461670) 275 secondguard:walkTo( 765.842346, height, -1398.791016) 276 secondguard:walkTo( 765.749695, height, -1425.336304) 277 secondguard:walkTo( 765.650024, height, -1454.007935) 282 278 hangarProgrammed = true 283 279 end … … 301 297 observePrisoner() 302 298 observeGuard() 299 observePlayer() 303 300 304 301 if not allOk then -
data/trunk/scripts/secondprisoner.lua
r3991 r4080 1 -- Get objects from orxonox 2 thisscript:addObject("GenericNPC", "Secondprisoner") 3 thisscript:addObject("FPSPlayer", "Player") 1 4 2 5 -- Initialises the random number generator
Note: See TracChangeset
for help on using the changeset viewer.