~ubuntu-branches/ubuntu/edgy/enigma/edgy-backports

« back to all changes in this revision

Viewing changes to data/levels/ss1.lua

  • Committer: Bazaar Package Importer
  • Author(s): Erich Schubert
  • Date: 2005-06-20 20:48:19 UTC
  • Revision ID: james.westby@ubuntu.com-20050620204819-ggqswr2gh3w9hhyr
Tags: upstream-0.92
ImportĀ upstreamĀ versionĀ 0.92

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-- A level for Enigma
 
2
-- Name:        Easy?
 
3
-- Copyright:   (C) 2003 Sven Siggelkow
 
4
-- License:     GPL v2.0 or above
 
5
 
 
6
levelw = 20
 
7
levelh = 13
 
8
 
 
9
create_world(levelw, levelh)
 
10
oxyd_default_flavor = "c"       -- Default flavor for oxyd stones.
 
11
 
 
12
draw_border("st-rock1")
 
13
fill_floor("fl-rough")
 
14
 
 
15
draw_stones ("st-rock1", {5,2},{1,0},11)
 
16
draw_stones ("st-rock1", {5,6},{1,0},5)
 
17
draw_stones ("st-rock1", {11,6},{1,0},5)
 
18
draw_stones ("st-rock1", {5,2},{0,1},5)
 
19
draw_stones ("st-rock1", {15,2},{0,1},5)
 
20
draw_stones ("st-rock1", {8,7},{0,1},5)
 
21
draw_stones ("st-rock1", {12,7},{0,1},5)
 
22
set_stone ("st-rock1",10,3)
 
23
 
 
24
draw_floor ("fl-water",{9,11},{1,0},3)
 
25
 
 
26
set_stone ("st-shogun",7,4)
 
27
draw_stones ("st-shogun", {9,4},{1,0},5)
 
28
 
 
29
shogundot1( 9, 7, {action="callback" , target="trig1"})
 
30
shogundot1( 9, 8, {action="callback" , target="trig2"})
 
31
shogundot1( 9, 9, {action="callback" , target="trig3"})
 
32
shogundot1( 9,10, {action="callback" , target="trig4"})
 
33
shogundot1(10, 9, {action="callback" , target="trig5"})
 
34
shogundot1(11, 9, {action="callback" , target="trig6"})
 
35
 
 
36
oxyd(1,11)
 
37
oxyd(18,11)
 
38
 
 
39
set_actor("ac-blackball", 10.5,5.5)
 
40
 
 
41
-- Ansrechbar als %door
 
42
local door = set_stone("st-door-v", 15, 4)
 
43
 
 
44
-- Ansprechbar als %switches
 
45
local switches={0,0,0,0,0,0}
 
46
doorsopen=0
 
47
 
 
48
function trig1 () trigger(1) end 
 
49
function trig2 () trigger(2) end 
 
50
function trig3 () trigger(3) end
 
51
function trig4 () trigger(4) end
 
52
function trig5 () trigger(5) end
 
53
function trig6 () trigger(6) end
 
54
 
 
55
function trigger(num)
 
56
   %switches[num] = 1-%switches[num]
 
57
   all=1
 
58
   for x=1,6 do
 
59
      if (%switches[x]==0) then
 
60
         all = 0
 
61
      end
 
62
   end
 
63
   if (doorsopen==0 and all==1) then
 
64
      SendMessage(%door, "open", TRUE)
 
65
      doorsopen = 1
 
66
   elseif (doorsopen==1 and all==0) then
 
67
      SendMessage(%door, "close", FALSE)
 
68
      doorsopen = 0
 
69
   end
 
70
end
 
 
b'\\ No newline at end of file'