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

  1. levelw = 20
  2. levelh = 13
  3.  
  4. create_world(levelw, levelh)
  5.  
  6. draw_border("st-rock3")
  7.  
  8. fill_floor("fl-marble",   0,0, level_width,level_height)
  9.  
  10. state_h1 = 0
  11. function trigger_h1()
  12.     if state_h1 == 0 then
  13.         state_h1 = 1
  14.     enigma.SendMessage( enigma.GetNamedObject("h1"), "trigger", nil)
  15.     else
  16.         state_h1 = 0
  17.     end
  18. end
  19.  
  20. state_h2 = 0
  21. function trigger_h2()
  22.     if state_h2 == 0 then
  23.         state_h2 = 1
  24.         enigma.SendMessage( enigma.GetNamedObject("h2"), "trigger", nil)
  25.     else
  26.         state_h2 = 0
  27.     end
  28. end
  29.  
  30. state_h3 = 0
  31. function trigger_h3()
  32.     if state_h3 == 0 then
  33.         state_h3 = 1
  34.         enigma.SendMessage( enigma.GetNamedObject("h3"), "trigger", nil)
  35.     else
  36.         state_h3 = 0
  37.     end
  38. end
  39.  
  40. state_h4 = 0
  41. function trigger_h4()
  42.     if state_h4 == 0 then
  43.         state_h4 = 1
  44.         enigma.SendMessage( enigma.GetNamedObject("h4"), "trigger", nil)
  45.     else
  46.         state_h4 = 0
  47.     end
  48. end
  49.  
  50. draw_stones( "st-rock3", { 5,7}, {0,1}, 5)
  51. draw_stones( "st-rock3", { 7,7}, {0,1}, 5)
  52. draw_stones( "st-rock3", { 9,7}, {0,1}, 5)
  53. draw_stones( "st-rock3", {11,7}, {0,1}, 5)
  54. draw_stones( "st-rock3", {13,7}, {0,1}, 5)
  55.  
  56.  
  57. set_item( "it-hollow", 6,11, {name="h1"})
  58. set_item( "it-hollow", 8,11, {name="h2"})
  59. set_item( "it-hollow",10,11, {name="h3"})
  60. set_item( "it-hollow",12,11, {name="h4"})
  61.  
  62. set_item("it-trigger", 6, 8, {invisible=1, action="callback", target="trigger_h1"})
  63. set_item("it-trigger", 8, 8, {invisible=1, action="callback", target="trigger_h2"})
  64. set_item("it-trigger",10, 8, {invisible=1, action="callback", target="trigger_h3"})
  65. set_item("it-trigger",12, 8, {invisible=1, action="callback", target="trigger_h4"})
  66.  
  67.  
  68. set_actor("ac-whiteball-small", 2.7,5, {player=0, mouseforce=1})
  69. set_actor("ac-whiteball-small",17.3,5, {player=0, mouseforce=1})
  70. set_actor("ac-whiteball-small", 3.7,5, {player=0, mouseforce=1})
  71. set_actor("ac-whiteball-small",16.3,5, {player=0, mouseforce=1})
  72.  
  73. enigma.AddConstantForce(0,17)
  74.  
  75.