The
trans is used for doing the transition.
The Transition basically copies layer information the fore page with the [
backlay] tag, fiddles with the part to be transitioned by the back page with the [image] tag, and executes the transition with the [trans] tag. Then, it is applied to the back page so that the change applied may change places into the present fore page.
First of all, let's switch the background layer by the Cross-Fade transition:
[image storage="bg0" page=fore layer=base]
[wait time=200]
*start|Start
[cm]
Hello. The background layer is switched. [l][r]
[backlay]
[image storage="bg1" layer=base page=back]
[trans method=crossfade time=1500]
[wt]
Did it change?
First of all, information of the fore layer is copied with the backlay tag.
And, the image that should be displayed in the background layer of the back page is read next.
At this point, the back page differs from the fore page in the matter of background image.
Next, the transition is executed with the trans tag. Thus, it becomes Cross-Fade transition if
method=crossfade
attribute is specified for the trans tag. Time is specified 1.5 seconds in this example. Because the times is specified in milliseconds,
time=1500
is written.
Note
There is no accuracy for the unit of the millisecond, though you have to specify everything in millisecond.
Afterwards,
wt tag is used to wait for the end of the transition.
KAG will just go to the next without waiting for the transition, if the wt tag is not written, so please remember to use the wt tag.
Note
There is another tag, which isn't limited to the transition and doesn't wait for the end of its previous tag, but actually waits for the end of the tag itself. It is used "To process something over time" in KAG. As a result, the fade-out of BGM can be done while doing the transition.
Moreover,
Please be sure to write "wait" as the corresponding waiting tag. Even if different kinds of things want to use the 'wait' tag(such as wait tag in the end of transition), it is necessary to write "wait" tag corresponding correctly by one respondent.
Moreover, if a universal transition is used, it looks as follows:
[image storage="bg0" page=fore layer=base]
[wait time=200]
*start|Start
[cm]
Hello. The background layer is switched. [l][r]
[backlay]
[image storage="bg1" layer=base page=back]
[trans method=universal rule="rule1" vague=1 time=1500]
[wt]
Did it change?
This example executes the transition with the trans tag. Thus, it becomes a universal transition if
method=universal
is specified as the attribute of trans(It is considered as the universal transition even if the method attribute is omitted). In this example, the rule image chosen is "rule1", time is 1.5 seconds, and the vague area value is 1.
Moreover, when you do the scroll transition from the right, with stay=nostay, then...
[image storage="bg0" page=fore layer=base]
[wait time=200]
*start|Stay
[cm]
Hello. The background layer is switched. [l][r]
[backlay]
[image storage="bg1" layer=base page=back]
[trans method=scroll from=right stay=nostay children=false time=1500]
[wt]
Did it change?
It looks like this. It is specified with
children=false
here, because 「
Child layer」 would move too, if not specified like this. In KAG, the background layer is the parent, while the foreground and the Message Layer is the child of the background layer.
Child Layers can also be scrolled with
children=true
(default, so you can omit it).