enigma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Enigma-devel] Hi from Ray Re: Enigma Level "Impulsive Order"


From: Ray Wick
Subject: [Enigma-devel] Hi from Ray Re: Enigma Level "Impulsive Order"
Date: Wed, 07 May 2008 16:33:50 -0700
User-agent: Thunderbird 2.0.0.12 (Windows/20080213)

Enigma E-mail List,

Here is my latest development of a new Enigma Level, "Impulsive Order". Please try it. Your comments are welcome.

   Thank You,
           Ray Wick
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<el:level xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://enigma-game.org/schema/level/1 level.xsd" 
xmlns:el="http://enigma-game.org/schema/level/1";>
  <el:protected>
    <el:info el:type="level">
      <el:identity el:title="Impulsive Order" el:subtitle="" 
el:id="RayWick005"/>
      <el:version el:score="1" el:release="1" el:revision="0" 
el:status="stable"/>
      <el:author  el:name="Ray Wick" el:email="address@hidden" el:homepage=""/>
      <el:copyright>Copyright © Ray Wick</el:copyright>
      <el:license el:type="Donated to Enigma under the projects license" 
el:open="true"/>
      <el:compatibility el:enigma="0.92">
      </el:compatibility>
      <el:modes el:easy="false" el:single="true" el:network="false"/>
      <el:comments>
        <el:code>Lua 5.1 and XML converted by Leveladministrators</el:code>
      </el:comments>
      <el:score el:easy="-" el:difficult="-"/>
    </el:info>
    <el:luamain><![CDATA[
LAND_FLOOR = "fl-marble"
MARBLE_FLOOR = "fl-marble"
WATER_FLOOR = "fl-water"
MARBLE = "st-marble"
GLASS = "st-glass"

function color_block( color, x, y)
       stone = format( "st-%s4", color)
       set_stone( stone, x, y)
end

level = {
    "                    ",
    "@.....;;~~~~;;.....@",
    "~~~~~~.~~~~;;~~~~~..",
    ".....;;;.....~......",
    "  ~~~~ ~~~~~~~~~~~  ",
    "@                  @",
    "ggg4g4g4g4g4g4g4g gg",
    "Lgg+g+g+g+g+g+g+g gg",
    "Mg x x x x x x x x~g",
    "Mg x x x x x x x x~@",
    "Mg x x x x x x x x~g",
    "Jgvgggggggggggggg gg",
    "ggEgggggg42gggggg gg",
    "g   g   44 K   GGGGg",
    "gvgvg  44  5g  g  Gg",
    "gCgBg 44  44g  g  Gg",
    "gvgvg 4  44gg  g  Gg",
    "g g g   44 gg  g  Gg",
    "g g gz 44  gg*Z4  Gg",
    "g > g   44 gg  g  Gg",
    "g < g 4  44gg  g  Gg",
    "g g g 44  44g  g  Gg",
    "g g g  44  3g  g  Gg",
    "gvgvg   44 K   GGGGg",
    "gCgBggggg46ggggg ggg",
    "gvgvgggggggggggg ggg",
    "g                1 @",
    "ggggggggggggggggggsg",
    "@    ~~~~gg~~~~    @",
    "     ~~~~gg~~~~     ",
    "     ~~~~gg~~~~     ",
    "~~~~~~~~    ~~~~~~~~",
    "ggggg~~~    ~~~ggggg",
    "~~~~~~~~    ~~~~~~~~",
    "     ~~~~gg~~~~     ",
    "@    ~~~~gg~~~~    @",
    "     ~~~~gg~~~~     "
}

cells = {}
cells["*"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_actor( "ac-blackball", x+0.5, y+0.5, {player=0} )
--    set_item( "it-yinyang", x, y+0.5 )
end
cells["."] = function( x, y )
    set_floor( "fl-swamp", x, y )
end
cells[";"] = function( x, y )
    set_floor( "fl-leaves", x, y )
end
cells["&"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_actor( "ac-whiteball", x+0.5, y+0.5, {player=1} )
--    set_item( "it-yinyang", x, y+0.5 )
end
cells["@"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    oxyd(x,y)
end
cells["+"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_stone( "st-wood", x, y )
end
cells["~"] = function( x, y )
    set_floor( WATER_FLOOR, x, y )
end
cells["<"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_stone( "st-oneway", x, y, {orientation=WEST})
end
cells[">"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_stone( "st-oneway", x, y, {orientation=EAST})
end
cells["^"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_stone( "st-oneway", x, y, {orientation=NORTH})
end
cells["v"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_stone( "st-oneway", x, y, {orientation=SOUTH})
end
cells["%"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_stone( "st-swap", x, y )
end
cells["x"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_item( "it-blackbomb", x, y )
end
cells["z"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    shogundot3(x, y, {action="callback", target="sdot3"})
end
cells["1"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    doorv(x, y, {name="door1"} )
end
cells["2"] = function( x, y )
    set_stone( "st-stoneimpulse", x, y, {name="imp2"} )
end
cells["3"] = function( x, y )
    set_stone( "st-stoneimpulse", x, y, {name="imp3"} )
end
cells["4"] = function( x, y )
    set_stone( "st-stoneimpulse", x, y, {name="imp4"} )
end
cells["5"] = function( x, y )
    set_stone( "st-stoneimpulse", x, y, {name="imp5"} )
end
cells["6"] = function( x, y )
    set_stone( "st-stoneimpulse", x, y, {name="imp6"} )
end
cells["8"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    doorv(x, y )
end
cells["9"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    doorh(x, y )
end
cells["A"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_item("it-trigger", x, y, {invisible=0, action="trigger", target="imp1"})
end
cells["B"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_item("it-trigger", x, y, {invisible=0, action="callback", 
target="hit2"})
end
cells["C"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_item("it-trigger", x, y, {invisible=0, action="callback", 
target="hit3"})
end
cells["D"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_item("it-trigger", x, y, {invisible=0, action="trigger", target="imp4"})
end
cells["E"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_item("it-trigger", x, y, {action="onoff", target="laser1"})
end
cells["G"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_stone( "st-grate2", x, y )
end
cells["I"] = function( x, y )
    set_floor( "fl-ice_001", x, y )
--    set_stone( "st-grate1", x, y )
end
cells["J"] = function( x, y )
    set_floor( MARBLE, x, y )
--    set_stone( "st-grate1", x, y )
end
cells["K"] = function( x, y )
    set_floor( "fl-abyss", x, y )
--    set_stone( "st-grate1", x, y )
end
cells["L"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_attrib(laser(x, y, FALSE, SOUTH), "name", "laser1")
end
cells["M"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_stone( "st-pmirror", x, y, {movable=0, transparent=1, orientation=2 })
end
cells["S"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_stone( "st-grate1", x, y )
    set_item( "it-seed", x+0.5, y+0.5 )
end
cells["V"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    color_block( "black", x, y)
end
cells["W"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    color_block( "white", x, y)
end
cells["Y"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_stone( "st-yinyang1", x, y )
end
cells["Z"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_stone( "st-shogun", x, y, {holes=7})
end
cells["a"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_stone( "st-grate1", x, y )
    set_item( "it-key_a", x, y )
end
cells["b"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_stone( "st-grate1", x, y )
    set_item( "it-key_b", x, y )
end
cells["c"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_stone( "st-grate1", x, y )
    set_item( "it-key_c", x, y )
end
cells["d"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_stone( "st-grate1", x, y )
    set_item( "it-floppy", x, y )
end
cells["g"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_stone( GLASS, x, y )
end
cells["s"] = function( x, y )
    set_floor( LAND_FLOOR, x, y )
    set_stone( "st-grate2", x, y )
    set_item( "it-spring1", x, y )
end
cells[" "] = function( x, y )
--     set_floor( LAND_FLOOR, x,y )
end

create_world( 20, 37 )
fill_floor(MARBLE_FLOOR, 0, 0, 20, 37 )
draw_border( MARBLE )
for y,line in pairs(level) do
    for x = 1,strlen(line) do
        cell = strchar(strbyte(line,x))
        cells[cell]( x-1, y-1 )
    end
end


-- counter variables for callbacks hit2 and hit3
through3 = 0
through2 = 0

function hit3()
    -- code so the impulse stones only fire when stepping ON
    -- the floor trigger (and don't fire when stepping OFF)
    through3 = through3 + 1
    if through3 == 1 then
        impc=enigma.GetNamedObject("imp3")
        enigma.SendMessage(impc, "trigger", nil)
        impe=enigma.GetNamedObject("imp5")
        enigma.SendMessage(impe, "trigger", nil)
    else
        through3 = 0
    end
end


function hit2()
    -- code so the impulse stones only fire when stepping ON
    -- the floor trigger (and don't fire when stepping OFF)
    through2 = through2 + 1
    if through2 == 1 then
        impb=enigma.GetNamedObject("imp2")
        enigma.SendMessage(impb, "trigger", nil)
        impf=enigma.GetNamedObject("imp6")
        enigma.SendMessage(impf, "trigger", nil)
    else
        through2 = 0
    end
end


function sdot3()
    -- shogun-dot callback, opens door when all of
    -- the dots are stacked in place.
    doora=enigma.GetNamedObject("door1")
    enigma.SendMessage(doora, "openclose", nil)
end

oxyd_shuffle()
oxyd_shuffle()
    ]]></el:luamain>
    <el:i18n>
      <el:string el:key="title">
        <el:english el:translate="false"/>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>

PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]