Difference between revisions of "LlSetScriptState/ja"

From Second Life Wiki
Jump to navigation Jump to search
m
 
Line 14: Line 14:
|constants
|constants
|examples=
|examples=
<lsl>//スクリプトを停止し、不定時間待機した後、他のスクリプトで TRUE で呼び出される
<source lang="lsl2">//スクリプトを停止し、不定時間待機した後、他のスクリプトで TRUE で呼び出される
llSetScriptState(llGetScriptName(),FALSE);
llSetScriptState(llGetScriptName(),FALSE);
// タイムスライスの終端で、停止する。
// タイムスライスの終端で、停止する。
llSleep(0.1);</lsl>
llSleep(0.1);</source>
<lsl>//別のスクリプトを開始する
<source lang="lsl2">//別のスクリプトを開始する
llSetScriptState("somescript",TRUE);</lsl>
llSetScriptState("somescript",TRUE);</source>
|helpers
|helpers
|also_functions=
|also_functions=

Latest revision as of 14:24, 25 February 2016

要約

関数: llSetScriptState( string name, integer run );

スクリプト name の実行状態を設定します。

• string name プリムの インベントリ の中にあるスクリプト
• integer run 真偽値。 FALSE であればスクリプトは停止します。

警告

  • name がプリムの中で見つからない場合、またはこれがスクリプトでない場合、エラーが DEBUG_CHANNEL 上で叫ばれます。
  • ランタイム エラー に陥ったスクリプトを再起動するのには使えません。
  • llGiveInventory で追加されたスクリプトを動かすのに使用することはできません。 llRemoteLoadScriptPin で送信されたスクリプトで、このコマンドにより FALSE が設定されたものは、開始することができます。
  • スクリプトはタイムスライスの終端で停止するので、時間差があります。スクリプトが自分自身を終了させる場合、 llSetScriptState の後に記述された LSL コードが、スクリプト停止前に実行されてしまうかもしれません。
All Issues ~ Search JIRA for related Bugs

サンプル

//スクリプトを停止し、不定時間待機した後、他のスクリプトで TRUE で呼び出される
llSetScriptState(llGetScriptName(),FALSE);
// タイムスライスの終端で、停止する。
llSleep(0.1);
//別のスクリプトを開始する
llSetScriptState("somescript",TRUE);

関連項目

特記事項

All Issues

~ Search JIRA for related Issues
   Scripts deactivated by llSetScriptState are reset when the region is reset, when they are taken into inventory and re-rezzed and when crossing sim boundaries.

Signature

function void llSetScriptState( string name, integer run );
この翻訳は 原文 と比べて古いですか?間違いがありますか?読みにくいですか?みんなで 修正 していきましょう! (手順はこちら)
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。