Script Guide_6 the time in a game and write a warning tip
[wait] - pause the game for a second
The script [wait] goes with one parameter, the time you want the player to wait. The game will pause and wait for while, when the game is waiting, the play cannot click to read the next line.
[wait Time]
Time: number in milliseconds.
[waitclick] - click to continue
This script goes with no parameter, it only stops some script from reading the next line automatically.Most used at the end of an [ask] sequence. The game continues with a click.
[waiclick]
Example: use wait to control a game
[img carrot.png|0|240|LayerA]
[wait 1000]
[img cabbage.png|0|240|LayerB]
[wait 1000]
[waitclick]
[dialog bunny| what should I eat for breakfast?]
This example shows the second picture after one second, and one second after the cabbage picture appears, players can click to read the dialog.
[setdurtime] - slow the menu down
It is a special script used to change the interval of time of the game setting. if the node <speed> exists in the staticvar.xml, this interval time of the game will be
(the duration time in init)*(the speed in staticvar)/10
[setdurtime]
Example: change the fade in time
[dialog bunny|hi!]
[eval speed=1000]
[setdurtime]
[img ramen1.png|0|120|LayerA]
[dialog bunny|it takes 100 seconds to show a picture]
[eval speed=50]
[setdurtime]
[img ramen1.png|200|120|LayerB]
[dialog bunny|it takes 5 seconds to show a picture]
[eval speed=0]
[setdurtime]
[img ramen1.png|400|120|LayerC]
[dialog bunny|the picture shows directly]
Use a round number as the <speed>.
If the node <speed> does not exist, this script would not work. The [setdurtime] change global time so the speed of menu bar is slow down too.
[showtip] - show tips and warning
The script [showtip] shows some text on the left top of the game. It is usually used to show some tips when the game is played, also, it shows some information when the scenario has something wrong. The tips stay on the screen for a while and fade out, the time it stays is set in the init.xml.
Goes with one parameter, the text you want show as a tip. Read the next line of script automatically.
[showtip Text]
Text: Some words you want to tell the players.
Example: write a Waring content
[showtip DO NOT COPY WHAT THE CHARACTERS DO IN YOUR REAL LIFE]
0 条评论:
发表评论
订阅 博文评论 [Atom]
<< 主页