summaryrefslogtreecommitdiff
path: root/demo.stage
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-12-11 23:00:45 -0700
committerMike Buland <eichlan@xagasoft.com>2011-12-11 23:00:45 -0700
commitac58dc8822b154a2ce51cc1b1317bc5e57ebf655 (patch)
treed9f7c95785720d1c1a3fce92c080e3021328c3ef /demo.stage
parent7c90fe68b557d32b65955ffd18e2e79585a7282b (diff)
downloadstage-ac58dc8822b154a2ce51cc1b1317bc5e57ebf655.tar.gz
stage-ac58dc8822b154a2ce51cc1b1317bc5e57ebf655.tar.bz2
stage-ac58dc8822b154a2ce51cc1b1317bc5e57ebf655.tar.xz
stage-ac58dc8822b154a2ce51cc1b1317bc5e57ebf655.zip
I think I've narrowed down how commands will work
It's kinda' cool for the most part, there will have to be some ways of referencing them later. Basically, there are global commands and situation commands. With any luck, it'll just work.
Diffstat (limited to 'demo.stage')
-rw-r--r--demo.stage36
1 files changed, 33 insertions, 3 deletions
diff --git a/demo.stage b/demo.stage
index 3d10efe..78e705c 100644
--- a/demo.stage
+++ b/demo.stage
@@ -2,6 +2,37 @@
2game 2game
3{ 3{
4 title = "Demo game"; 4 title = "Demo game";
5
6 command: "take" item
7 {
8 if item in situation.items then
9 {
10 player.inventory += item;
11 situation.items -= item;
12 display('''You pickup the ''' + item +
13 ''' and put it in your pocket.''');
14 }
15 else
16 {
17 display('''You don't see anything like that here.''');
18 }
19 }
20
21 command: "use" item
22 {
23 if not item in player.inventory then
24 {
25 display('''You don't have anything like that in your pocket.''');
26 }
27 else
28 {
29 }
30 }
31}
32
33situation <<main>>
34{
35 player.inventory = [];
5} 36}
6 37
7function hello() 38function hello()
@@ -10,9 +41,8 @@ function hello()
10 41
11situation <<start>> 42situation <<start>>
12{ 43{
13// set situation end; 44 display('''You are here, there is a wrench sitting on the table.''');
14// push situation somethingElse; 45 global.command("use",
15
16} 46}
17 47
18situation <<end>> 48situation <<end>>