Changeset 8630
- Timestamp:
- May 27, 2011, 11:01:24 PM (14 years ago)
- Location:
- code/branches/spacerace
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/spacerace/data/levels/spaceRace.oxw
r8617 r8630 61 61 <RaceCheckPoint name="checkpoint1" position="0,-2000,1000" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="0" islast="false"> 62 62 <attached> 63 <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" /> 64 </attached> 65 <collisionShapes> 66 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" /> 67 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" /> 68 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" /> 69 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" /> 70 </collisionShapes> 71 </RaceCheckPoint> 72 73 <RaceCheckPoint name="checkpoint2" position="0,-900,2300" stayActive="true" collisionType="static" scale="1" distance="40" checkpointindex="1" islast="false"> 74 <attached> 75 <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" /> 76 <SpawnPoint position="0,0,0" lookat="0,1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" > 77 <events> 78 <activity> 79 <Trigger mode="xor" invert="true" > 80 <EventTrigger> 81 <events> 82 <trigger> 83 <EventListener event="checkpoint2" /> 84 </trigger> 85 </events> 86 </EventTrigger> 87 <EventTrigger invert="true"> 88 <events> 89 <trigger> 90 <EventListener event="checkpoint3" /> 91 </trigger> 92 </events> 93 </EventTrigger> 94 </Trigger> 95 </activity> 96 </events> 97 </SpawnPoint> 98 </attached> 99 <collisionShapes> 100 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" /> 101 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" /> 102 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" /> 103 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" /> 104 </collisionShapes> 105 </RaceCheckPoint> 106 107 <RaceCheckPoint name="checkpoint3" position="0,700,2700" stayActive="true" direction="0,0,1" collisionType="static" scale="1" distance="40" checkpointindex="2" islast="false"> 108 <attached> 109 <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" /> 110 <SpawnPoint position="0,0,0" lookat="0,1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" > 111 <events> 112 <activity> 113 <Trigger mode="xor" invert="true" > 114 <EventTrigger> 115 <events> 116 <trigger> 117 <EventListener event="checkpoint3" /> 118 </trigger> 119 </events> 120 </EventTrigger> 121 <EventTrigger invert="true"> 122 <events> 123 <trigger> 124 <EventListener event="checkpoint4" /> 125 </trigger> 126 </events> 127 </EventTrigger> 128 </Trigger> 129 </activity> 130 </events> 131 </SpawnPoint> 132 </attached> 133 <collisionShapes> 134 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" /> 135 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" /> 136 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" /> 137 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" /> 138 </collisionShapes> 139 </RaceCheckPoint> 140 141 <RaceCheckPoint name="checkpoint4" position="0,2100,2300" stayActive="true" direction="0,1,1" collisionType="static" scale="1" distance="40" checkpointindex="3" islast="false"> 142 <attached> 143 <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" /> 144 <DistanceTrigger name="trigger3" position="0,0,0" distance=40 stayActive="true" /> 145 <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" > 146 <events> 147 <activity> 148 <Trigger mode="xor" invert="true" > 149 <EventTrigger> 150 <events> 151 <trigger> 152 <EventListener event="checkpoint4" /> 153 </trigger> 154 </events> 155 </EventTrigger> 156 <EventTrigger invert="true"> 157 <events> 158 <trigger> 159 <EventListener event="checkpoint5" /> 160 </trigger> 161 </events> 162 </EventTrigger> 163 </Trigger> 164 </activity> 165 </events> 166 </SpawnPoint> 167 </attached> 168 <collisionShapes> 169 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" /> 170 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" /> 171 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" /> 172 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" /> 173 </collisionShapes> 174 </RaceCheckPoint> 175 176 <RaceCheckPoint name="checkpoint5" position="0,2200,500" stayActive="true" direction="0,1,0" collisionType="static" scale="1" distance="40" checkpointindex="4" islast="false"> 177 <attached> 63 178 <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" /> 64 </attached> 65 <collisionShapes> 66 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" /> 67 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" /> 68 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" /> 69 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" /> 70 </collisionShapes> 71 </RaceCheckPoint> 72 73 <RaceCheckPoint name="checkpoint2" position="0,-900,2300" stayActive="true" collisionType="static" scale="1" distance="40" checkpointindex="1" islast="false"> 74 <attached> 75 <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" /> 76 <SpawnPoint position="0,0,0" lookat="0,1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" > 77 <events> 78 <activity> 79 <Trigger mode="xor" invert="true" > 80 <EventTrigger> 81 <events> 82 <trigger> 83 <EventListener event="checkpoint2" /> 84 </trigger> 85 </events> 86 </EventTrigger> 87 <EventTrigger invert="true"> 88 <events> 89 <trigger> 90 <EventListener event="checkpoint3" /> 91 </trigger> 92 </events> 93 </EventTrigger> 94 </Trigger> 95 </activity> 96 </events> 97 </SpawnPoint> 98 </attached> 99 <collisionShapes> 100 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" /> 101 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" /> 102 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" /> 103 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" /> 104 </collisionShapes> 105 </RaceCheckPoint> 106 107 <RaceCheckPoint name="checkpoint3" position="0,700,2700" stayActive="true" direction="0,0,1" collisionType="static" scale="1" distance="40" checkpointindex="2" islast="false"> 108 <attached> 109 <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" /> 110 <SpawnPoint position="0,0,0" lookat="0,1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" > 111 <events> 112 <activity> 113 <Trigger mode="xor" invert="true" > 114 <EventTrigger> 115 <events> 116 <trigger> 117 <EventListener event="checkpoint3" /> 118 </trigger> 119 </events> 120 </EventTrigger> 121 <EventTrigger invert="true"> 122 <events> 123 <trigger> 124 <EventListener event="checkpoint4" /> 125 </trigger> 126 </events> 127 </EventTrigger> 128 </Trigger> 129 </activity> 130 </events> 131 </SpawnPoint> 132 </attached> 133 <collisionShapes> 134 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" /> 135 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" /> 136 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" /> 137 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" /> 138 </collisionShapes> 139 </RaceCheckPoint> 140 141 <RaceCheckPoint name="checkpoint4" position="0,2100,2300" stayActive="true" direction="0,1,1" collisionType="static" scale="1" distance="40" checkpointindex="3" islast="false"> 142 <attached> 143 <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" /> 144 <DistanceTrigger name="trigger3" position="0,0,0" distance=40 stayActive="true" /> 145 <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" > 146 <events> 147 <activity> 148 <Trigger mode="xor" invert="true" > 149 <EventTrigger> 150 <events> 151 <trigger> 152 <EventListener event="checkpoint4" /> 153 </trigger> 154 </events> 155 </EventTrigger> 156 <EventTrigger invert="true"> 157 <events> 158 <trigger> 159 <EventListener event="checkpoint5" /> 160 </trigger> 161 </events> 162 </EventTrigger> 163 </Trigger> 164 </activity> 165 </events> 166 </SpawnPoint> 167 </attached> 168 <collisionShapes> 169 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" /> 170 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" /> 171 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" /> 172 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" /> 173 </collisionShapes> 174 </RaceCheckPoint> 175 176 <RaceCheckPoint name="checkpoint5" position="0,2200,500" stayActive="true" direction="0,1,0" collisionType="static" scale="1" distance="40" checkpointindex="4" islast="false"> 177 <attached> 178 <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" /> 179 <DistanceTrigger name="trigger4" position="0,0,0" distance=40 stayActive="true" /> 180 <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" > 181 <events> 182 <activity> 183 <Trigger mode="xor" invert="true" > 184 <EventTrigger> 185 <events> 186 <trigger> 187 <EventListener event="checkpoint5" /> 188 </trigger> 189 </events> 190 </EventTrigger> 191 <EventTrigger invert="true"> 192 <events> 193 <trigger> 194 <EventListener event="checkpoint6" /> 195 </trigger> 196 </events> 197 </EventTrigger> 198 </Trigger> 199 </activity> 200 </events> 201 </SpawnPoint> 202 </attached> 203 <collisionShapes> 204 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" /> 205 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" /> 206 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" /> 207 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" /> 208 </collisionShapes> 179 <DistanceTrigger name="trigger4" position="0,0,0" distance=40 stayActive="true" /> 180 <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" > 181 <events> 182 <activity> 183 <Trigger mode="xor" invert="true" > 184 <EventTrigger> 185 <events> 186 <trigger> 187 <EventListener event="checkpoint5" /> 188 </trigger> 189 </events> 190 </EventTrigger> 191 <EventTrigger invert="true"> 192 <events> 193 <trigger> 194 <EventListener event="checkpoint6" /> 195 </trigger> 196 </events> 197 </EventTrigger> 198 </Trigger> 199 </activity> 200 </events> 201 </SpawnPoint> 202 </attached> 203 <collisionShapes> 204 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" /> 205 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" /> 206 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" /> 207 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" /> 208 </collisionShapes> 209 209 </RaceCheckPoint> 210 210 211 211 <RaceCheckPoint name="checkpoint6" position="0,1500,-800" stayActive="true" direction="0,1,-1" collisionType="static" scale="1" distance="40" checkpointindex="5" islast="false"> 212 <attached>213 <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />214 <DistanceTrigger name="trigger5" position="0,0,0" distance=40 stayActive="true" />215 <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >216 <events>217 <activity>218 <Trigger mode="xor" invert="true" >219 <EventTrigger>220 <events>221 <trigger>222 <EventListener event="checkpoint6" />223 </trigger>224 </events>225 </EventTrigger>226 <EventTrigger invert="true">227 <events>228 <trigger>229 <EventListener event="checkpoint7" />230 </trigger>231 </events>232 </EventTrigger>233 </Trigger>234 </activity>235 </events>236 </SpawnPoint>237 </attached>238 <collisionShapes>239 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" />240 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" />241 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" />242 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" />243 </collisionShapes>212 <attached> 213 <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" /> 214 <DistanceTrigger name="trigger5" position="0,0,0" distance=40 stayActive="true" /> 215 <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" > 216 <events> 217 <activity> 218 <Trigger mode="xor" invert="true" > 219 <EventTrigger> 220 <events> 221 <trigger> 222 <EventListener event="checkpoint6" /> 223 </trigger> 224 </events> 225 </EventTrigger> 226 <EventTrigger invert="true"> 227 <events> 228 <trigger> 229 <EventListener event="checkpoint7" /> 230 </trigger> 231 </events> 232 </EventTrigger> 233 </Trigger> 234 </activity> 235 </events> 236 </SpawnPoint> 237 </attached> 238 <collisionShapes> 239 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" /> 240 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" /> 241 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" /> 242 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" /> 243 </collisionShapes> 244 244 </RaceCheckPoint> 245 245 246 246 <RaceCheckPoint name="checkpoint7" position="0,200,-1900" stayActive="true" collisionType="static" scale="1" distance="40" checkpointindex="6" islast="false"> 247 <attached>248 <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />249 <DistanceTrigger name="trigger6" position="0,0,0" distance=40 stayActive="true" />250 <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >251 <events>252 <activity>253 <Trigger mode="xor" invert="true" >254 <EventTrigger>255 <events>256 <trigger>257 <EventListener event="checkpoint7" />258 </trigger>259 </events>260 </EventTrigger>261 <EventTrigger invert="true">262 <events>263 <trigger>264 <EventListener event="checkpoint8" />265 </trigger>266 </events>267 </EventTrigger>268 </Trigger>269 </activity>270 </events>271 </SpawnPoint>272 </attached>273 <collisionShapes>274 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" />275 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" />276 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" />277 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" />278 </collisionShapes>247 <attached> 248 <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" /> 249 <DistanceTrigger name="trigger6" position="0,0,0" distance=40 stayActive="true" /> 250 <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" > 251 <events> 252 <activity> 253 <Trigger mode="xor" invert="true" > 254 <EventTrigger> 255 <events> 256 <trigger> 257 <EventListener event="checkpoint7" /> 258 </trigger> 259 </events> 260 </EventTrigger> 261 <EventTrigger invert="true"> 262 <events> 263 <trigger> 264 <EventListener event="checkpoint8" /> 265 </trigger> 266 </events> 267 </EventTrigger> 268 </Trigger> 269 </activity> 270 </events> 271 </SpawnPoint> 272 </attached> 273 <collisionShapes> 274 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" /> 275 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" /> 276 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" /> 277 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" /> 278 </collisionShapes> 279 279 </RaceCheckPoint> 280 280 281 281 <RaceCheckPoint name="checkpoint8" position="0,-700,-1400" stayActive="true" direction="0,-1,-1" collisionType="static" scale="1" distance="40" checkpointindex="7" islast="false"> 282 <attached>283 <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />284 <DistanceTrigger name="trigger7" position="0,0,0" distance=40 stayActive="true" />285 <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >286 <events>287 <activity>288 <Trigger mode="xor" invert="true" >289 <EventTrigger>290 <events>291 <trigger>292 <EventListener event="checkpoint8" />293 </trigger>294 </events>295 </EventTrigger>296 <EventTrigger invert="true">297 <events>298 <trigger>299 <EventListener event="checkpoint9" />300 </trigger>301 </events>302 </EventTrigger>303 </Trigger>304 </activity>305 </events>306 </SpawnPoint>307 </attached>308 <collisionShapes>309 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" />310 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" />311 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" />312 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" />313 </collisionShapes>282 <attached> 283 <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" /> 284 <DistanceTrigger name="trigger7" position="0,0,0" distance=40 stayActive="true" /> 285 <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" > 286 <events> 287 <activity> 288 <Trigger mode="xor" invert="true" > 289 <EventTrigger> 290 <events> 291 <trigger> 292 <EventListener event="checkpoint8" /> 293 </trigger> 294 </events> 295 </EventTrigger> 296 <EventTrigger invert="true"> 297 <events> 298 <trigger> 299 <EventListener event="checkpoint9" /> 300 </trigger> 301 </events> 302 </EventTrigger> 303 </Trigger> 304 </activity> 305 </events> 306 </SpawnPoint> 307 </attached> 308 <collisionShapes> 309 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" /> 310 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" /> 311 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" /> 312 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" /> 313 </collisionShapes> 314 314 </RaceCheckPoint> 315 315 316 316 <RaceCheckPoint name="checkpoint9" position="0,-1300,-800" stayActive="true" collisionType="static" scale="1" distance="40" checkpointindex="8" islast="false"> 317 <attached>318 <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />319 <DistanceTrigger name="trigger8" position="0,0,0" distance=40 stayActive="true" />320 <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >321 <events>322 <activity>323 <EventTrigger>324 <events>325 <trigger>326 <EventListener event="checkpoint9" />327 </trigger>328 </events>329 </EventTrigger>330 </activity>331 </events>332 </SpawnPoint>333 </attached>334 <collisionShapes>335 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" />336 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" />337 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" />338 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" />339 </collisionShapes>317 <attached> 318 <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" /> 319 <DistanceTrigger name="trigger8" position="0,0,0" distance=40 stayActive="true" /> 320 <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" > 321 <events> 322 <activity> 323 <EventTrigger> 324 <events> 325 <trigger> 326 <EventListener event="checkpoint9" /> 327 </trigger> 328 </events> 329 </EventTrigger> 330 </activity> 331 </events> 332 </SpawnPoint> 333 </attached> 334 <collisionShapes> 335 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" /> 336 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" /> 337 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" /> 338 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" /> 339 </collisionShapes> 340 340 </RaceCheckPoint> 341 341 342 342 <RaceCheckPoint name="checkpoint10" position="0,-2100,0" collisionType="static" scale="1" distance="40" checkpointindex="9" islast="true" timelimit="150"> 343 <attached>344 <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />345 </attached>346 <collisionShapes>347 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" />348 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" />349 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" />350 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" />351 </collisionShapes>343 <attached> 344 < Model mass="50" scale="50" mesh="raceCheckPoint.mesh" /> 345 </attached> 346 <collisionShapes> 347 <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" /> 348 <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" /> 349 <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" /> 350 <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" /> 351 </collisionShapes> 352 352 </RaceCheckPoint> 353 353 … … 355 355 <Planet position="0,0,0" scale=300 pitch=-90 mesh="iceplanet.mesh" atmosphere="atmosphere1" rotationaxis="8,1,0" rotationrate="1" atmospheresize=224.0f imagesize=1024.0f /> 356 356 <StaticEntity position="0,0,0" collisionType=static> 357 358 359 357 <collisionShapes> 358 <SphereCollisionShape radius="399" /> 359 </collisionShapes> 360 360 </StaticEntity> 361 361 … … 365 365 for i = 0, max, 1 366 366 do 367 367 y = math.sin(i/max*6)*2000 368 368 z = math.cos(i/max*6)*2500 369 369 x = 0 … … 385 385 <attached> 386 386 <Model position="0,0,0" scale="<?lua print(j * 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh"> 387 387 <?lua if k == 5 then ?><attached><!-- ---------asteroid fog----- --> 388 388 <ParticleEmitter position="0,0,0" source="Orxonox/Steam" /> 389 389 </attached> <?lua end ?> 390 390 </Model> 391 391 </attached> 392 392 <collisionShapes> … … 451 451 <controller> 452 452 <WaypointPatrolController alertnessradius=1500 team=0 > 453 454 455 453 <waypoints> 454 <Model scale=0 position="0,2000,2000" /> 455 </waypoints> 456 456 </WaypointPatrolController> 457 457 </controller> … … 463 463 </templates> 464 464 <controller> 465 466 467 468 469 465 <WaypointPatrolController alertnessradius=1500 team=0 > 466 <waypoints> 467 <Model scale=0 position="0,2000,-2000" /> 468 </waypoints> 469 </WaypointPatrolController> 470 470 </controller> 471 471 </SpaceShip> -
code/branches/spacerace/src/modules/gametypes/RaceCheckPoint.cc
r8617 r8630 38 38 CreateFactory(RaceCheckPoint); 39 39 40 RaceCheckPoint::RaceCheckPoint(BaseObject* creator): 41 DistanceTrigger(creator), 42 RadarViewable(creator, static_cast<WorldEntity*>(this)) 40 RaceCheckPoint::RaceCheckPoint(BaseObject* creator): DistanceTrigger(creator), RadarViewable(creator, static_cast<WorldEntity*>(this)) 43 41 { 44 45 46 47 48 49 50 42 RegisterObject(RaceCheckPoint); 43 44 this->bCheckpointIndex_ = 0; 45 this->bIsLast_ = false; 46 this->bTimeLimit_ = 0; 47 48 this->setRadarObjectColour(ColourValue::Blue); 51 49 this->setRadarObjectShape(RadarViewable::Triangle); 52 50 this->setRadarVisibility(false); … … 59 57 void RaceCheckPoint::tick(float dt) 60 58 { 61 Trigger::tick(dt); 62 63 SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get()); 64 if (this->getCheckpointIndex() == gametype->getCheckpointsReached()) this->setRadarVisibility(true); 65 else this->setRadarVisibility(false); 59 SUPER(RaceCheckPoint, tick, dt); 60 61 SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get()); 62 if (this->getCheckpointIndex() == gametype->getCheckpointsReached()) 63 this->setRadarVisibility(true); 64 else 65 this->setRadarVisibility(false); 66 66 } 67 67 … … 69 69 void RaceCheckPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode) 70 70 { 71 72 73 74 75 71 SUPER(RaceCheckPoint, XMLPort, xmlelement, mode); 72 73 XMLPortParam(RaceCheckPoint, "checkpointindex", setCheckpointIndex, getCheckpointIndex, xmlelement, mode).defaultValues(0); 74 XMLPortParam(RaceCheckPoint, "islast", setLast, getLast, xmlelement, mode).defaultValues(false); 75 XMLPortParam(RaceCheckPoint, "timelimit", setTimelimit, getTimeLimit, xmlelement, mode).defaultValues(0); 76 76 } 77 77 78 78 void RaceCheckPoint::triggered(bool bIsTriggered) 79 79 { 80 DistanceTrigger::triggered(bIsTriggered); 81 82 SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get()); 83 if (gametype) 84 { 85 if (this->getCheckpointIndex() == gametype->getCheckpointsReached() && bIsTriggered) 86 { 87 gametype->clock_->capture(); 88 float time = gametype->clock_->getSecondsPrecise(); 89 if (this->bTimeLimit_!=0 && time > this->bTimeLimit_) { 90 gametype->timeIsUp(); 91 gametype->end(); 92 } 93 else if (this->getLast()) 94 { 95 gametype->end(); 96 } 97 else 98 { 99 gametype->newCheckpointReached(); 100 this->setRadarObjectColour(ColourValue::Green); //sets the radar colour of the checkpoint to green if it is reached, else it is red. 101 } 102 } 103 } 80 DistanceTrigger::triggered(bIsTriggered); 81 82 SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get()); 83 if (gametype && this->getCheckpointIndex() == gametype->getCheckpointsReached() && bIsTriggered) 84 { 85 gametype->clock_.capture(); 86 float time = gametype->clock_.getSecondsPrecise(); 87 if (this->bTimeLimit_!=0 && time > this->bTimeLimit_) 88 { 89 gametype->timeIsUp(); 90 gametype->end(); 91 } 92 else if (this->getLast()) 93 gametype->end(); 94 else 95 { 96 gametype->newCheckpointReached(); 97 this->setRadarObjectColour(ColourValue::Green); //sets the radar colour of the checkpoint to green if it is reached, else it is red. 98 } 99 } 104 100 } 105 101 106 102 void RaceCheckPoint::setTimelimit(float timeLimit) 107 { 108 109 110 111 112 113 114 const std::string& message = "\nYou have " + multi_cast<std::string>(this->bTimeLimit_)115 + " seconds to reach the check point " + multi_cast<std::string>(this->bCheckpointIndex_+1) + "\n\n";116 COUT(0) << message;117 118 119 120 103 { 104 this->bTimeLimit_ = timeLimit; 105 if (this->bTimeLimit_ != 0) 106 { 107 SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get()); 108 if (gametype) 109 { 110 const std::string& message = "You have " + multi_cast<std::string>(this->bTimeLimit_) 111 + " seconds to reach the check point " + multi_cast<std::string>(this->bCheckpointIndex_+1) + "\n"; 112 COUT(3) << message; 113 const_cast<GametypeInfo*>(gametype->getGametypeInfo())->sendAnnounceMessage(message); 114 } 115 } 116 } 121 117 122 118 } -
code/branches/spacerace/src/modules/gametypes/RaceCheckPoint.h
r8616 r8630 34 34 #include "objects/triggers/DistanceTrigger.h" 35 35 #include "interfaces/RadarViewable.h" 36 #include <boost/concept_check.hpp>36 //#include <boost/concept_check.hpp> 37 37 38 38 namespace orxonox … … 40 40 /** 41 41 @brief 42 The RaceCheckPoint class enables the creation of a check point to use in a SpaceRace level.43 !!! Don't forget to controll the indexes of your check points and to set one last check point!!!42 The RaceCheckPoint class enables the creation of a check point to use in a SpaceRace level. 43 !!! Don't forget to control the indexes of your check points and to set one last check point!!! 44 44 */ 45 45 class _ObjectsExport RaceCheckPoint : public DistanceTrigger, public RadarViewable 46 46 { 47 public:48 49 50 51 52 53 54 protected:55 56 57 58 59 60 61 62 63 64 65 66 67 68 { return this; }69 70 private:71 72 73 47 public: 48 RaceCheckPoint(BaseObject* creator); 49 virtual ~RaceCheckPoint(); 50 51 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 52 virtual void tick(float dt); 53 54 protected: 55 virtual void triggered(bool bIsTriggered); 56 inline void setLast(bool isLast) 57 { this->bIsLast_ = isLast; } 58 inline bool getLast() 59 { return this->bIsLast_; } 60 inline void setCheckpointIndex(int checkpointIndex) 61 { this->bCheckpointIndex_ = checkpointIndex; } 62 inline int getCheckpointIndex() 63 { return this->bCheckpointIndex_; } 64 virtual void setTimelimit(float timeLimit); 65 inline float getTimeLimit() 66 { return this->bTimeLimit_;} 67 inline const WorldEntity* getWorldEntity() const 68 { return this; } 69 70 private: 71 int bCheckpointIndex_; //The index of this check point. This value will be compared with the number of check points reached in the level. The check points must be indexed in ascending order beginning from zero and without any jumps between the indexes. 72 bool bIsLast_; //True if this check point is the last of the level. There can be only one last check point for each level and there must be a last check point in the level. 73 float bTimeLimit_; //The time limit (from the start of the level) to reach this check point. If the check point is reached after this time, the game ends and the player looses. 74 74 75 75 }; 76 76 } 77 77 78 #endif 78 #endif /* _RaceCheckPoint_H__ */ -
code/branches/spacerace/src/modules/gametypes/SpaceRace.cc
r8624 r8630 41 41 SpaceRace::SpaceRace(BaseObject* creator) : Gametype(creator) 42 42 { 43 RegisterObject(SpaceRace); 44 this->bCheckpointsReached_ = 0; 45 this->bTimeIsUp_ = false; 46 this->numberOfBots_ = 0; 47 } 48 49 void SpaceRace::tick(float dt) 50 { 51 Gametype::tick(dt); 43 RegisterObject(SpaceRace); 44 this->bCheckpointsReached_ = 0; 45 this->bTimeIsUp_ = false; 46 this->numberOfBots_ = 0; 52 47 } 53 48 54 49 void SpaceRace::end() 55 50 { 56 Gametype::end(); 57 if (this->bTimeIsUp_) { 58 this->clock_->capture(); 59 int s = this->clock_->getSeconds(); 60 int ms = this->clock_->getMilliseconds()-1000*s; 61 const std::string& message = multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds !!\n" 62 + "You didn't reach the check point " + multi_cast<std::string>(this->bCheckpointsReached_+1) 63 + " before the time limit. You lose!\n"; 64 COUT(0) << message; 65 const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message); 66 Host::Broadcast(message); 67 } 68 else { 69 this->clock_->capture(); 70 int s = this->clock_->getSeconds(); 71 int ms = this->clock_->getMilliseconds()-1000*s; 72 const std::string& message = "You win!! You have reached the last check point after "+ multi_cast<std::string>(s) 73 + "." + multi_cast<std::string>(ms) + " seconds.\n"; 74 COUT(0) << message << std::endl; 75 const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message); 76 Host::Broadcast(message); 77 float time = this->clock_->getSecondsPrecise(); 78 this->scores_.insert(time); 79 std::set<float>::iterator it; 80 for (it=this->scores_.begin(); it!=this->scores_.end(); it++) 81 COUT(0) << multi_cast<std::string>(*it) << std::endl; 82 } 51 this->Gametype::end(); 52 53 if (this->bTimeIsUp_) 54 { 55 this->clock_.capture(); 56 int s = this->clock_.getSeconds(); 57 int ms = this->clock_.getMilliseconds()-1000*s; 58 const std::string& message = multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds !!\n" 59 + "You didn't reach the check point " + multi_cast<std::string>(this->bCheckpointsReached_+1) 60 + " before the time limit. You lose!"; 61 COUT(3) << message; 62 const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message); 63 Host::Broadcast(message); 64 } 65 else 66 { 67 this->clock_.capture(); 68 int s = this->clock_.getSeconds(); 69 int ms = this->clock_.getMilliseconds()-1000*s; 70 const std::string& message = "You win!! You have reached the last check point after "+ multi_cast<std::string>(s) 71 + "." + multi_cast<std::string>(ms) + " seconds."; 72 COUT(3) << message << std::endl; 73 const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message); 74 Host::Broadcast(message); 75 float time = this->clock_.getSecondsPrecise(); 76 this->scores_.insert(time); 77 std::set<float>::iterator it; 78 for (it=this->scores_.begin(); it!=this->scores_.end(); it++) 79 COUT(3) << multi_cast<std::string>(*it) << std::endl; 80 } 83 81 } 84 82 85 83 void SpaceRace::start() 86 84 { 87 Gametype::start(); 88 89 clock_= new Clock(); 90 std::string message("The match has started! Reach the check points as quickly as possible!"); 91 COUT(0) << message << std::endl; 85 Gametype::start(); 86 87 std::string message("The match has started! Reach the check points as quickly as possible!"); 88 COUT(3) << message << std::endl; 92 89 Host::Broadcast(message); 93 90 } … … 95 92 void SpaceRace::newCheckpointReached() 96 93 { 97 98 this->clock_->capture();99 int s = this->clock_->getSeconds();100 int ms = this->clock_->getMilliseconds()-1000*s;101 const std::string& message = "Checkpoint " + multi_cast<std::string>(this->getCheckpointsReached()) 102 103 104 COUT(0) << message << std::endl;105 106 94 this->bCheckpointsReached_++; 95 this->clock_.capture(); 96 int s = this->clock_.getSeconds(); 97 int ms = this->clock_.getMilliseconds()-1000*s; 98 const std::string& message = "Checkpoint " + multi_cast<std::string>(this->getCheckpointsReached()) 99 + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) 100 + " seconds.\n"; 101 COUT(3) << message; 102 const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message); 103 Host::Broadcast(message); 107 104 } 108 105 -
code/branches/spacerace/src/modules/gametypes/SpaceRace.h
r8616 r8630 42 42 /** 43 43 @brief 44 The SpaceRace class enables the creation of a space race level, where the player has to reach check points in a given order.44 The SpaceRace class enables the creation of a space race level, where the player has to reach check points in a given order. 45 45 */ 46 46 class _OrxonoxExport SpaceRace : public Gametype 47 47 { 48 public: 49 SpaceRace(BaseObject* creator); 50 virtual ~SpaceRace() {} 51 52 virtual void tick(float dt); 53 54 virtual void start(); 55 virtual void end(); 56 57 virtual void newCheckpointReached(); 58 59 inline void setCheckpointsReached(int n) 60 { this->bCheckpointsReached_ = n;} 61 inline int getCheckpointsReached() 62 { return this->bCheckpointsReached_; } 63 inline void timeIsUp() 64 { this->bTimeIsUp_ = true;} 65 Clock *clock_; //The clock starts running at the beginning of the game. It is used to give the time at each check point, the give the time at the end of the game, and to stop the game if a check point is reached too late. 66 protected: 67 68 private: 69 int bCheckpointsReached_; //The current number of check points reached by the player. 70 std::set<float> scores_; //The times of the players are saved in a set. 71 bool bTimeIsUp_; //True if one of the check points is reached too late. 48 friend class RaceCheckPoint; 49 50 public: 51 SpaceRace(BaseObject* creator); 52 virtual ~SpaceRace() {} 53 54 virtual void start(); 55 virtual void end(); 56 57 virtual void newCheckpointReached(); 58 59 inline void setCheckpointsReached(int n) 60 { this->bCheckpointsReached_ = n;} 61 inline int getCheckpointsReached() 62 { return this->bCheckpointsReached_; } 63 inline void timeIsUp() 64 { this->bTimeIsUp_ = true;} 65 66 protected: 67 68 private: 69 int bCheckpointsReached_; //The current number of check points reached by the player. 70 std::set<float> scores_; //The times of the players are saved in a set. 71 bool bTimeIsUp_; //True if one of the check points is reached too late. 72 Clock clock_; //The clock starts running at the beginning of the game. It is used to give the time at each check point, the give the time at the end of the game, and to stop the game if a check point is reached too late. 72 73 }; 73 74 } 74 75 75 #endif 76 #endif /* _SpaceRace_H__ */
Note: See TracChangeset
for help on using the changeset viewer.