LuaAPI.wiki
changeset 42 565e15a60043
parent 39 45a576e56425
child 43 c07e89eded71
equal deleted inserted replaced
41:bf0470871144 42:565e15a60043
    80 <code lang="lua">    local gear = !AddGear(0, 0, gtTarget, 0, 0, 0, 0)
    80 <code lang="lua">    local gear = !AddGear(0, 0, gtTarget, 0, 0, 0, 0)
    81     !FindPlace(gear, true, 0, LAND_WIDTH)</code>
    81     !FindPlace(gear, true, 0, LAND_WIDTH)</code>
    82 
    82 
    83 === <tt>!AddVisualGear(x, y, viusalGearType, state, critical)</tt> ===
    83 === <tt>!AddVisualGear(x, y, viusalGearType, state, critical)</tt> ===
    84 
    84 
    85 <blockquote>This creates a new visual gear at position x,y (measured from top left) of kind visualGearType (see [visualGearTypes Visual Gear Types]).  The function returns the uid of the visual gear created.  Set critical to true if the visual gear is crucial to game play.  False if it is just an effect, and can be skipped when in fastforward (such as when joining a room).  A critical visual gear will always be created, a non-critical one may fail.  Most visual gears delete themselves. 
    85 <blockquote>This creates a new visual gear at position x,y (measured from top left) of kind visualGearType (see [VisualGearTypes Visual Gear Types]).  The function returns the uid of the visual gear created.  Set critical to true if the visual gear is crucial to game play.  False if it is just an effect, and can be skipped when in fastforward (such as when joining a room).  A critical visual gear will always be created, a non-critical one may fail.  Most visual gears delete themselves. 
    86 </blockquote>
    86 </blockquote>
    87 Example:
    87 Example:
    88 
    88 
    89 <code lang="lua">    vgear = !AddVisualGear(1000, 1000, vgtExplosion, 0, false) -- adds an non-critical explosion at position 1000,1000. Returns 0 if it was not created.
    89 <code lang="lua">    vgear = !AddVisualGear(1000, 1000, vgtExplosion, 0, false) -- adds an non-critical explosion at position 1000,1000. Returns 0 if it was not created.
    90 </code>
    90 </code>