2017年2月9日星期四

Script Guide_2 Image and sound

A  visual novel is too pale without pictures and musics. It should have some background pictures, music and a picture of your character.

[img] - avatar of a character


The script [img] goes with four or five parameters, read the next line of script automatically.

[img Filename| posX| posY| Layer| Time] 

Filename: The filename of the imagine, all the file can be found in the role directory. IF the filename parameter is empty or an “unload”, the layer will be cleaned
posX: the position where the imagine display horizontal. Change the position to make the layer move.
posY: the position where the imagine display vertical . Change the position to make the layer move.

Layer: the name of the layer where the imagine placed on.
Time: if you want the imagine fade in/out or move in some time longer. Not a necessary parameter.

Example: A Simple imagine show

[img avatar.png|0|240|LayerC]
[dialog Bunny |Hello there!]
[img avata2.png|50|240|LayerC|1000]
[dialog Bunny |I have <font  color="#ff0000">Red</font> eyes]
[img unload|100|240|LayerC]
[clearimg]

➽ The script [img] supports some swf files; you can show small animations with this.


[clearimg]-remove all imagine

The script [clearimg] will clean all the imagines in all layers. It is a faster way to remove all the imagines on the screen instead of unloading them one by one. Read the next line of script automatically.


[background]-show background picture

The script [background] goes with one parameter, the path of the background imagines. The background stays at the bottom of all layers.
read the next line of script automatically.

[background Filename]

Filename: the filename of the imagine, all the file can be found in the ui directory. IF the filename parameter is “clear”, the layer will be cleaned


Example: show a background picture

[background clear]
[background white.jpg]

this example remove the old picture and show a new imagine file.


[sound]-sound effects

The script [sound] goes with one parameter, the path of the mp3 file. The sound clip will be played once.
Read the next line of script automatically.

[sound Filename]

Filename: the filename of the sound file, only mp3 file. All the file can be found in the sound directory.

Example: play a sound effect

[sound bgm4.mp3]


[bgm]-a background music

The script [bgm] goes with one parameter, the path of the mp3 file. The music will loop until it go to a script [bgmstop].
Read the next line of script automatically.

[bgm Filename]

Filename: the filename of the sound file, only mp3 file. All the file can be found in the sound directory.

Example: have a background music

[bgm bgm4.mp3][bgmstop]



标签: , ,

0 条评论:

发表评论

订阅 博文评论 [Atom]

<< 主页