From ac58dc8822b154a2ce51cc1b1317bc5e57ebf655 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 11 Dec 2011 23:00:45 -0700 Subject: 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. --- demo.stage | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'demo.stage') diff --git a/demo.stage b/demo.stage index 3d10efe..78e705c 100644 --- a/demo.stage +++ b/demo.stage @@ -2,6 +2,37 @@ game { title = "Demo game"; + + command: "take" item + { + if item in situation.items then + { + player.inventory += item; + situation.items -= item; + display('''You pickup the ''' + item + + ''' and put it in your pocket.'''); + } + else + { + display('''You don't see anything like that here.'''); + } + } + + command: "use" item + { + if not item in player.inventory then + { + display('''You don't have anything like that in your pocket.'''); + } + else + { + } + } +} + +situation <
> +{ + player.inventory = []; } function hello() @@ -10,9 +41,8 @@ function hello() situation <> { -// set situation end; -// push situation somethingElse; - + display('''You are here, there is a wrench sitting on the table.'''); + global.command("use", } situation <> -- cgit v1.2.3