source: trunk/PARPG/tools/Writing Editor/docs/examples/example.dialog @ 226

Revision 226, 1009 bytes checked in by bretzel_parpg, 10 years ago (diff)

Started on documentation and added an example script. Also made the editor call the right quit function
when you click the x or hit alt+F4

Line 
1# Define characters. Kind of like C++ where you declare their class
2NPC Guard
3
4SECTION MainDialog # A section of dialog. If you had a lot of dialog, you could organize it into sections
5                   # and then call them.
6
7Guard SAY "You cannot pass." # [who says it] SAY [what to say]
8
9OPTION leaveOrFight # OPTION [option_name]x
101 "Fine." leaveGuard # [option_number] [what_to_say] [what_section_to_run]
112 "I must pass." attackGuard
12ENDOPTION # End the option
13
14ENDSECTION
15
16
17SECTION leaveGuard
18   guardDead = False
19   PLAYSOUND "testsound.wav" 1 # PLAYSOUND [sound_file] [number_of_times]
20   ENDSCRIPT # End the script
21ENDSECTION
22
23SECTION attackGuard
24   SAY Guard "I will not let you pass."
25   ATTACK PC Guard # ATTACK [attacker] [victim]
26   # Assumes that PC did not die because game will end and script will not continue
27   guardDead = True
28   PLAYSOUND "testsound2.wav" 2
29ENDSECTION
30
31
32CALLSECTION MainDialog # CALLSECTION [section_name]
33
34RETURN guardDead # End the script and return whether or not the guard is dead
Note: See TracBrowser for help on using the repository browser.