Changeset 3965 for data/branches/single_player_map
- Timestamp:
- Jun 30, 2006, 5:29:32 PM (18 years ago)
- Location:
- data/branches/single_player_map
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
data/branches/single_player_map/scripts/guard.lua
r3964 r3965 18 18 playerZ = Player:getAbsCoorZ() 19 19 20 if dist( playerX,playerY,playerZ,16 1.76,49,358.87) < 60 then20 if dist( playerX,playerY,playerZ,167.361526,29,483.163818 ) < 60 then 21 21 playerInLock = true 22 22 end … … 60 60 guard:walkTo( -137.526047, height, 192.228226) 61 61 guard:walkTo( -103.046753, height, 182.510071) 62 guard: walkTo( -14.992087, height, 181.910767)63 guard: walkTo( 46.347664, height, 181.493317)64 guard: walkTo( 86.343376, height, 181.221130)65 guard: walkTo( 124.465179, height, 194.251617)66 guard: walkTo( 136.548996, height, 219.682953)67 guard: walkTo( 145.162140, height, 244.268982)68 guard: walkTo( 149.328720, height, 256.993256)69 guard: walkTo( 162.649582, height, 268.181732)62 guard:runTo( -14.992087, height, 181.910767) 63 guard:runTo( 46.347664, height, 181.493317) 64 guard:runTo( 86.343376, height, 181.221130) 65 guard:runTo( 124.465179, height, 194.251617) 66 guard:runTo( 136.548996, height, 219.682953) 67 guard:runTo( 145.162140, height, 244.268982) 68 guard:runTo( 149.328720, height, 256.993256) 69 guard:runTo( 162.649582, height, 268.181732) 70 70 71 71 routeOneProgrammed = true -
data/branches/single_player_map/scripts/prisoner.lua
r3964 r3965 19 19 20 20 function observeGuard() 21 guardX = guard:getAbsCoorX()22 guardY = guard:getAbsCoorY()23 guardZ = guard:getAbsCoorZ()24 25 if dist( guardX,guardY,guardZ, 198.427155, 29, 243.656113) < 60 then21 guardX = secondguard:getAbsCoorX() 22 guardY = secondguard:getAbsCoorY() 23 guardZ = secondguard:getAbsCoorZ() 24 25 if dist( guardX,guardY,guardZ, 43.406876, 29, 179.517303) < 60 then 26 26 cellDoorOpened = true 27 27 end … … 40 40 end 41 41 42 43 42 44 walkProgrammed = false 43 45 exitProgrammed = false 44 46 function walkInCell(timestep) 47 45 48 46 49 if not walkProgrammed then … … 71 74 72 75 if prisoner:finalGoalReached() and not cellDoorOpened then 73 walkProgrammed = false 74 end 76 walkProgrammed = false 77 end 78 75 79 76 80 if cellDoorOpened then … … 109 113 end 110 114 111 end 112 113 return false 114 115 end 116 117 118 return false 119 120 end 121 122 123 gotoExitProgrammed = false 124 function goToExit(timestep) 125 -- do not forget to make him wait until the player triggeres the trip to the hangar 126 if not gotoExitProgrammed and playerInLock then 127 128 gotoExitProgrammed = true 115 end 116 117 return false 118 119 end 120 121 122 hangarRouteProgrammed = false 123 function goToHangar(timestep) 124 125 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 243 hangarRouteProgrammed = true 244 end 245 246 thisX = prisoner:getAbsCoorX() 247 thisY = prisoner:getAbsCoorY() 248 thisZ = prisoner:getAbsCoorZ() 249 250 if dist( thisX,thisY,thisZ, 3.175952, 29, -1610.220093) < 60 then 251 return true 252 end 253 254 255 return false 256 257 end 258 259 spaceshipRouteProgrammed = false 260 function goToSpaceship(timestep) 261 262 if not spaceshipRouteProgrammed then 263 264 265 spaceshipRouteProgrammed = true 129 266 end 130 267 … … 134 271 135 272 return false 136 end137 138 hangarRouteProgrammed = false139 function goToHangar(timestep)140 141 if not hangarRouteProgrammed then142 143 hangarRouteProgrammed = true144 end145 146 if prisoner:finalGoalReached() then147 return true148 end149 150 return false151 152 end153 154 spaceshipRouteProgrammed = false155 function goToSpaceship(timestep)156 157 if not spaceshipRouteProgrammed then158 159 160 spaceshipRouteProgrammed = true161 end162 163 if prisoner:finalGoalReached() then164 return true165 end166 167 return false168 273 169 274 end … … 183 288 184 289 185 if not cellDoorOpend then290 if not walkinCellFinished then 186 291 walkinCellFinished = walkInCell(timestep) 187 292 end 188 293 189 if walkinCellFinished and not exitReached then 190 exitReached = goToExit(timestep) 191 end 192 193 if exitReached and not hangarReached then 294 295 if walkinCellFinished and not hangarReached then 194 296 hangarReached = goToHangar(timestep) 195 297 end -
data/branches/single_player_map/scripts/secondguard.lua
r3964 r3965 19 19 guardZ = guard:getAbsCoorZ() 20 20 21 if dist( guardX,guardY,guardZ,35.48, 29, 191.28 ) < 60 then21 if dist( guardX,guardY,guardZ,35.48, 29, 191.28 ) < 30 then 22 22 allOk = false 23 23 end … … 32 32 33 33 if dist( prisonerX,prisonerY,prisonerZ,162.757919,49,363.489349 ) < 60 then 34 io.write("Prisonner reached lock \n")35 --prisonerReachedLock = true34 --io.write("Prisonner reached lock \n") 35 prisonerReachedLock = true 36 36 end 37 37 … … 283 283 end 284 284 285 if secondguard:finalGoalReached() then 285 guardX = secondguard:getAbsCoorX() 286 guardY = secondguard:getAbsCoorY() 287 guardZ = secondguard:getAbsCoorZ() 288 289 if dist( guardX,guardY,guardZ, 2.861493, 29, -1705.131958) < 60 then 286 290 return true 287 291 end … … 291 295 end 292 296 297 time = 2 293 298 function tick(timestep) 294 299 --io.write("Secondguard called \n") … … 301 306 end 302 307 308 --do talking 309 if cellReached then 310 time = time - timestep 311 end 312 313 314 if time < 0 then 315 303 316 if cellReached and not guidePositionReached then 304 317 guidePositionReached = goToGuidePosition(timestep) … … 313 326 end 314 327 328 329 end 330 331 315 332 return false 316 333 end -
data/branches/single_player_map/worlds/sp_level_ambush_at_jupiter.oxw
r3964 r3965 35 35 <object>GenericNPC, prisoner</object> 36 36 <object>FPSPlayer, Player</object> 37 <object>GenericNPC, guard</object>37 <object>GenericNPC, secondguard</object> 38 38 </Script> 39 39 … … 47 47 <file>falldown.lua</file> 48 48 <object>GenericNPC, Fallingguy </object> 49 <object>FPSPlayer, Player</object> 50 </Script> 51 52 <Script> 53 <file>floorguy.lua</file> 54 <object>GenericNPC, floorguy </object> 49 55 <object>FPSPlayer, Player</object> 50 56 </Script> … … 115 121 <name>spaceshiptrigger</name> 116 122 <file>spaceship.lua</file> 123 <function>tick</function> 124 <abs-coor>-84, 19, 77</abs-coor> 125 <radius>100</radius> 126 <worldentity>Player</worldentity> 127 <debugdraw>true</debugdraw> 128 </ScriptTrigger> 129 130 131 <ScriptTrigger> 132 <name>floorguytrigger</name> 133 <file>floorguy.lua</file> 117 134 <function>tick</function> 118 135 <abs-coor>-84, 19, 77</abs-coor> … … 185 202 <md2texture>doom_guy.png</md2texture> 186 203 <abs-coor>-65, 29, 528</abs-coor> 204 <abs-dir>0, 0, 1, 0</abs-dir> 205 </GenericNPC> 206 207 <GenericNPC> 208 <name>floorguy</name> 209 <model>models/creatures/doom_guy.md2, 10</model> 210 <md2texture>doom_guy.png</md2texture> 211 <abs-coor>800.634338, 29, -340.454163</abs-coor> 187 212 <abs-dir>0, 0, 1, 0</abs-dir> 188 213 </GenericNPC>
Note: See TracChangeset
for help on using the changeset viewer.