Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 29 and Version 30 of content/LevelHowTo


Ignore:
Timestamp:
Nov 29, 2011, 6:17:12 PM (13 years ago)
Author:
jo
Comment:

to be continued

Legend:

Unmodified
Added
Removed
Modified
  • content/LevelHowTo

    v29 v30  
    191191<ForceField position="-500,0,500" direction="0,0,-1" diameter=500 velocity=2500 length=750 />
    192192}}}
    193 As you maybe already have noticed - you don't have the ForceField to be attached to a worldentity.
     193As you maybe already have noticed - you don't have the ForceField to be attached to a Worldentity.
    194194
    195195ForceField in action:
    196 *Place the ForceField next to the spawnpoint to give the player extra boost when entering the level.
    197 
    198 Have a look at "asteroids.oxw" and "theTimeMachine.oxw", to see how to make forcefields visible in the level.
     196*Place the ForceField next to the Spawnpoint to give the player extra boost when entering the level.
     197
     198Have a look at "asteroids.oxw" and "theTimeMachine.oxw", to see how to make ForceFields visible in the level.
    199199
    200200== Lua ==
    201 Lua is the scripting language we use in our levels. At the beginning of the file templates for spaceships, the hud and more are loaded.
    202 
    203 == Triggers ==
    204 
    205 == Events ==
     201Lua is the scripting language we use in our levels. At the beginning of the file templates for spaceships, the hud and more are loaded. What lua does is in fact editing the XML file before the level is loaded. (that's why you cannot rely on the line numbers displayed when an error occurs.
     202
     203What lua can do:
     204 * load external skripts: for example the cuboid spacestation.
     205{{{
     206#!xml <?lua
     207    dofile("includes/CuboidSpaceStation.lua")
     208?>
     209<!-- First, the skript has to be included. -->
     210
     211<!-- Usage: Creates a modular space station -->
     212<StaticEntity scale=1 position="4650,5350,-11050" name=base visible=true active=true yaw=60>
     213    <attached>
     214        <?lua
     215            createSpaceStationPar(9851,2,1,2,1,2,1,100)
     216        ?>
     217    </attached>
     218</StaticEntity>
     219}}}
     220
     221 * {{{
     222#!xml <?lua
     223for i = 1, 10, 1 do
     224?>
     225
     226<?lua end ?>
     227<!-- A for loop. the index i starts from 1, is increased up to 10 by adding +1. -->
     228}}}
     229
     230 * <?lua print(math.random() * 10 + 5) ?>
     231
     232
     233== Triggers && Events==
     234Example: ../data/levels/events.oxw
     235
    206236
    207237== Quests ==
     238Example: ../data/levels/quests.oxw