Difference between revisions of "State exit/ja"
Jump to navigation
Jump to search
Asuka Neely (talk | contribs) (New page: {{LSL_Event/ja |event_id=1|event_delay|event=state_exit |event_desc=ステート変移に限定して作動します。 |constants |spec |caveats |examples=<lsl>default { ...) |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{LSL_Event/ja | {{LSL_Event/ja | ||
|event_id=1|event_delay|event=state_exit | |event_id=1|event_delay|event=state_exit | ||
|event_desc= | |event_desc={{LSLG/ja|state}} を遷移させるときに発生します。 | ||
|constants | |constants | ||
|spec | |spec | ||
|caveats | |caveats= | ||
|examples=< | * {{LSLG/ja|state_exit}} の間にキューに入ったイベントは、次の state に入る前に捨てられます。これを避けるために、なるべく {{LSLG/ja|state_entry}} を使いましょう。 {{LSLG/ja|state}} にさらに警告が載っています。 | ||
|examples=<source lang="lsl2">default | |||
{ | { | ||
state_entry() | state_entry() | ||
Line 35: | Line 36: | ||
llOwnerSay("leaving state \"other\""); | llOwnerSay("leaving state \"other\""); | ||
} | } | ||
}</ | }</source> | ||
|helpers | |helpers | ||
|also_header | |also_header | ||
Line 42: | Line 43: | ||
|also_articles | |also_articles | ||
|also_footer | |also_footer | ||
|notes | |notes=スクリプトがリセットされたときに {{LSLG/ja|default}} の {{LSLG/ja|state_entry}} が発生しますが、リセットの前に state_exit は発生しません。 | ||
|mode | |mode | ||
|deprecated | |deprecated |
Latest revision as of 10:21, 21 February 2016
LSL ポータル | 関数 | イベント | 型 | 演算子 | 定数 | 実行制御 | スクリプトライブラリ | カテゴリ別スクリプトライブラリ | チュートリアル |
警告
- state_exit の間にキューに入ったイベントは、次の state に入る前に捨てられます。これを避けるために、なるべく state_entry を使いましょう。 state にさらに警告が載っています。
サンプル
default
{
state_entry()
{
llOwnerSay("in default state");
}
touch_start(integer detected)
{
state other;
}
state_exit()
{
llOwnerSay("leaving default state");
}
}
state other
{
state_entry()
{
llOwnerSay("in state \"other\"");
}
touch_start(integer detected)
{
state default;
}
state_exit()
{
llOwnerSay("leaving state \"other\"");
}
}
注意点
スクリプトがリセットされたときに default の state_entry が発生しますが、リセットの前に state_exit は発生しません。
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。