home *** CD-ROM | disk | FTP | other *** search
/ GameStar Special 2004 August / GSSH0804.iso / Geschicklichkeit / Enigma / Enigma-081.exe / data / levels / ss10.lua < prev    next >
Text File  |  2003-09-21  |  2KB  |  70 lines

  1. -- Sven Siggelkow 2003
  2.  
  3. levelw = 20
  4. levelh = 13
  5. create_world(levelw, levelh)
  6. set_actor("ac-blackball",2,3.5, {player=0})
  7. set_actor("ac-whiteball-small", 17.5,6.5,{player=0, controllers=1})
  8. difficult = (options.Difficulty==2)
  9. fill_floor("fl-rough",0,0,levelw,levelh)
  10. local laser1 = laser(14,2, TRUE, EAST)
  11. function renderLine( line, pattern)
  12.     for i=1, strlen(pattern) do
  13.       local c = strsub( pattern, i, i)
  14.       if c ==   "#" then
  15.          set_stone("st-greenbrown", i-1,line)
  16.       elseif c=="h" then
  17.          set_item("it-hollow", i-1,line)
  18.       elseif c=="b" then
  19.          if difficult==FALSE then
  20.           set_item("it-spade", i-1,line)
  21.          end
  22.       elseif c=="G" then                          
  23.          set_stone("st-white1", i-1,line)
  24.       elseif c=="s" then
  25.          set_stone("st-greenbrown_move", i-1,line)
  26.          set_item("it-springboard", i-1,line)
  27.       elseif c=="w" then
  28.          set_stone("st-3mirror", i-1,line, {movable=1})
  29.          set_item("it-spring2", i-1,line)
  30.       elseif c=="y" then
  31.          set_stone("st-yinyang1", i-1,line)
  32.       elseif c=="g" then
  33.          set_stone("st-greenbrown_hole", i-1,line)
  34.       elseif c=="x" then
  35.          set_stone("st-glass1", i-1,line)
  36.       elseif c=="H" then
  37.          set_stone("st-greenbrown_hole", i-1,line)
  38.          set_item("it-hollow", i-1,line, {name="hollow"})
  39.       elseif c=="S" then
  40.          set_stone("st-switch", i-1,line,{action="callback", target="s1"})         
  41.       elseif c=="a" then
  42.          set_floor("fl-abyss", i-1,line)
  43.       elseif c=="c" then                
  44.          set_floor("fl-water", i-1,line)
  45.       elseif c=="l" then                
  46.          set_floor("fl-leaves", i-1,line)
  47.       elseif c=="O" then
  48.      oxyd(i-1,line)
  49.         end
  50.     end  
  51. end
  52. --               01234567890123456789
  53. renderLine(00 , "####################")
  54. renderLine(01 , "#G aaacclccaaab   H#")
  55. renderLine(02 , "#  aaacclccaaa xxx #")
  56. renderLine(03 , "#  aaacclccaaa     #")
  57. renderLine(04 , "#  aaacclccaaah h  #")  
  58. renderLine(05 , "#  aaacclccaaa     #")
  59. renderLine(06 , "# saaacclccaaa w   #")
  60. renderLine(07 , "#  aaacclccaaa     #")
  61. renderLine(08 , "#  aaacclccaaah h  #")
  62. renderLine(09 , "#  aaacclccaaa     #")
  63. renderLine(10 , "#  aaacclccaaa     #")
  64. renderLine(11 , "#g aaacclccaaa    yS")
  65. renderLine(12 , "####################")
  66. --               01234567890123456789
  67.  
  68. function s1()
  69.  enigma.SendMessage(%laser1, "signal", nil)
  70. end