State exit/ja
< State exit
Jump to navigation
Jump to search
Revision as of 05:50, 20 May 2010 by Mako Nozaki (talk | contribs)
LSL ポータル | 関数 | イベント | 型 | 演算子 | 定数 | 実行制御 | スクリプトライブラリ | カテゴリ別スクリプトライブラリ | チュートリアル |
警告
- state_exit の間にキューに入ったイベントは、次の state に入る前に捨てられます。これを避けるために、なるべく state_entry を使いましょう。 state にさらに警告が載っています。
サンプル
<lsl>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\""); }
}</lsl>
注意点
スクリプトがリセットされたときに default の state_entry が発生しますが、リセットの前に state_exit は発生しません。
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。