Changes between Version 43 and Version 44 of content/LevelHowTo
- Timestamp:
- Dec 22, 2013, 11:48:39 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
content/LevelHowTo
v43 v44 252 252 253 253 So far your level design is static. Everything is placed in the level, when it is loaded (except the spawned objects) and doesn't change its behaviour once loaded. Via the trigger/event system you can make the level react on what the player does. 254 A trigger is like a button. When you activate it, something happens. 254 A trigger is like a button. When you activate it an event is created. This event can change the status of objects. 255 This way objects can be activated/deativated and be made visible/invisible. 256 === Distance Triggers === 255 257 {{{ 256 258 #!xml … … 280 282 <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=50 /> 281 283 </attached> 282 <collisionShapes>283 <BoxCollisionShape position="-560,0,0" halfExtents="115,100,245" />284 < ... >285 </collisionShapes>286 284 </SpaceShip> 287 285 }}} … … 295 293 296 294 <!-- By this Spaceship --> 297 <SpaceShip position = "10 ,-202, -42" ... >295 <SpaceShip position = "100,300,900" ... > 298 296 <attached> 299 297 <DistanceTriggerBeacon name="coolSpaceship" /> 300 298 <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=50 /> 301 299 </attached> 302 <collisionShapes>303 <BoxCollisionShape position="-560,0,0" halfExtents="115,100,245" />304 < ... >305 </collisionShapes>306 300 </SpaceShip> 307 308 }}} 301 }}} 302 303 === Other event sources === 304 {{{ 305 #!xml 306 <!-- When this Pawn is destroyed --> 307 <Pawn health=30 position="0,300,0" direction="0,-1,0" collisionType="dynamic" mass="100000" name="kaboom" radarname = "Box 1"> 308 <attached> 309 <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" /> 310 </attached> 311 <collisionShapes> 312 <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" /> 313 </collisionShapes> 314 </Pawn> 315 316 <!-- an event called "kaboom" is created --> 317 <SimpleNotification message="Right click on the next target." broadcast="true"> 318 <events> 319 <trigger> 320 <EventListener event="kaboom" /> 321 </trigger> 322 </events> 323 </SimpleNotification> 324 }}} 325 326 === === 327 328 === What events can do === 329 * Making objects visible: 330 {{{ 331 #!xml 332 333 <Pawn health=30 position="0,300,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box radarname = "Box 1"> 334 <events> 335 <visibility> 336 <EventListener event="flying4" /> 337 </visibility> 338 </events> 339 <attached> 340 <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" /> 341 </attached> 342 <collisionShapes> 343 <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" /> 344 </collisionShapes> 345 <controller> 346 <WaypointController team=1> 347 </WaypointController> 348 </controller> 349 </Pawn> 350 }}} 351 * (De)activating objects: 352 {{{ 353 #!xml 354 355 }}} 356 * Executing ConsoleCommands (= executing code): 357 {{{ 358 #!xml 359 360 }}} 361 309 362 310 363 == Quests ==