mail[Wesnoth-commits] r44973 - /trunk/data/scenario-test.cfg


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by upthorn on July 31, 2010 - 12:08:
Author: upthorn
Date: Sat Jul 31 12:08:23 2010
New Revision: 44973

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44973&view=rev
Log:
added a quick and dirty persistence demo to the test scenario

Modified:
    trunk/data/scenario-test.cfg

Modified: trunk/data/scenario-test.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/scenario-test.cfg?rev=44973&r1=44972&r2=44973&view=diff
==============================================================================
--- trunk/data/scenario-test.cfg (original)
+++ trunk/data/scenario-test.cfg Sat Jul 31 12:08:23 2010
@@ -639,6 +639,66 @@
         [/objectives]
     [/event]
 
+    [event]
+        name=side 1 turn 1
+                [get_global_variable]
+            side=global
+            namespace="demo"
+            from_global=greeting
+            to_local=greeting
+        [/get_global_variable]
+        [if]
+            [not]
+                [variable]
+                    name=greeting
+                    equals=$empty
+                [/variable]
+            [/not]
+            [then]
+                [message]
+                    speaker=narrator
+                    message=$greeting
+                [/message]
+                [message]
+                    speaker=narrator
+                    message=Is this greeting really okay?
+                    [option]
+                        message="Yes"
+                    [/option]      
+                    [option]
+                        message="No"
+                        [command]
+                            [message]
+                                speaker=narrator
+                                message=How would you like to be greeted?
+                                [text_input]
+                                    label="Greeting message"
+                                    variable=greeting
+                                [/text_input]
+                            [/message]
+                        [/command]
+                    [/option]
+                [/message]
+            [/then]
+            [else]
+                [message]
+                    speaker=narrator
+                    message=How would you like to be greeted?
+                    [text_input]
+                        label="Greeting message"
+                        variable=greeting
+                    [/text_input]
+                [/message]
+            [/else]
+        [/if]
+        [set_global_variable]
+            side=global
+            namespace="demo"
+            from_local=greeting
+            to_global=greeting
+        [/set_global_variable]
+    [/event]
+    
     [event]
         name=moveto
         [filter]




Related Messages


Powered by MHonArc, Updated Sat Jul 31 12:20:17 2010