home *** CD-ROM | disk | FTP | other *** search
/ GameStar Special 2004 August / GSSH0804.iso / Geschicklichkeit / Enigma / Enigma-081.exe / data / levels / siegfried89.lua < prev    next >
Encoding:
Text File  |  2003-05-03  |  3.3 KB  |  105 lines

  1. --Siegfried Fennig 02.05.2003 Rev.0
  2.  
  3. levelw = 20
  4. levelh = 13
  5.  
  6. create_world(levelw, levelh)
  7. draw_border("st-glass2")
  8. enigma.ConserveLevel = FALSE
  9. oxyd_default_flavor = "d"
  10. fill_floor("fl-abyss", 0, 0, level_width, level_height)
  11. fill_floor("fl-marble", 1, 1, level_width-2, level_height-2)
  12.  
  13. function renderLine( line, pattern)
  14.     for i=1, strlen(pattern) do
  15.       local c = strsub( pattern, i, i)
  16.       if c =="s" then
  17.          set_stone("st-stoneimpulse",i-1,line)
  18.       elseif c == "c" then
  19.          set_stone("st-stoneimpulse-hollow",i-1,line)
  20.       elseif c == "g" then
  21.          set_stone("st-glass2",i-1,line)
  22.       elseif c == "H" then
  23.          set_stone("st-glass2_hole",i-1,line)
  24.       elseif c == "A" then
  25.          set_stone("st-stoneimpulse",i-1,line, {name="impulse1"})
  26.       elseif c == "B" then
  27.          set_stone("st-stoneimpulse",i-1,line, {name="impulse2"})
  28.       elseif c == "C" then
  29.          set_stone("st-stoneimpulse-hollow",i-1,line, {name="impulse3"})
  30.       elseif c == "D" then
  31.          set_stone("st-stoneimpulse-hollow",i-1,line, {name="impulse4"})
  32.       elseif c == "E" then
  33.          set_stone("st-stoneimpulse-hollow",i-1,line, {name="impulse5"})
  34.       elseif c == "N" then
  35.          set_stone("st-oneway",i-1,line, {orientation=enigma.NORTH})
  36.       elseif c == "S" then
  37.          set_stone("st-oneway",i-1,line, {orientation=enigma.SOUTH})
  38.       elseif c == "w" then
  39.          set_stone("st-wood",i-1,line)
  40.       elseif c == "1" then
  41.          set_item("it-trigger",i-1,line, {action="callback", target="st1"})
  42.       elseif c == "2" then
  43.          set_item("it-trigger",i-1,line, {action="callback", target="st2"})
  44.       elseif c == "3" then
  45.          set_item("it-trigger",i-1,line, {action="callback", target="st3"})
  46.       elseif c == "4" then
  47.          set_item("it-trigger",i-1,line, {action="callback", target="st4"})
  48.       elseif c == "5" then
  49.          set_item("it-trigger",i-1,line, {action="callback", target="st5"})
  50.       elseif c == "o" then
  51.          oxyd( i-1, line)
  52.       elseif c == "#" then
  53.          set_item("it-seed",i-1,line)
  54.       elseif c == "a" then
  55.          set_actor("ac-blackball", i-.5,line+.5, {player=0})
  56.         end
  57.     end
  58. end
  59.  
  60. --              01234567890123456789
  61. renderLine(00, "                    ")
  62. renderLine(01, "   gggggss          ")
  63. renderLine(02, "    12  #ss       o ")
  64. renderLine(03, "   gggHs##ss      o ")
  65. renderLine(04, " gNEggSss##ss     o ")
  66. renderLine(05, " gcwwc gss##ss    o ")
  67. renderLine(06, " Cc45cDg ss##ss   o ")
  68. renderLine(07, "     ggg  ss##ss  o ")
  69. renderLine(08, "     g     ss# B  o ")
  70. renderLine(09, " o   g     gssw   o ")
  71. renderLine(10, " o   ggggggg sA     ")
  72. renderLine(11, "       3 a gggggggg ")
  73. renderLine(12, "                    ")
  74. --              01234567890123456789
  75.  
  76. oxyd_shuffle()
  77.  
  78. function st1()
  79.     impa=enigma.GetNamedObject("impulse1")
  80.     enigma.SendMessage(impa, "trigger", nil)
  81. end
  82.  
  83. function st2()
  84.     impa=enigma.GetNamedObject("impulse2")
  85.     enigma.SendMessage(impa, "trigger", nil)
  86. end
  87.  
  88. function st3()
  89.     impa=enigma.GetNamedObject("impulse3")
  90.     impb=enigma.GetNamedObject("impulse5")
  91.     enigma.SendMessage(impa, "trigger", nil)
  92.     enigma.SendMessage(impb, "trigger", nil)
  93. end
  94.  
  95. function st4()
  96.     impa=enigma.GetNamedObject("impulse3")
  97.     enigma.SendMessage(impa, "trigger", nil)
  98. end
  99.  
  100. function st5()
  101.     impa=enigma.GetNamedObject("impulse4")
  102.     enigma.SendMessage(impa, "trigger", nil)
  103. end
  104.  
  105.