ActionWait(float)
objectのキューに待機アクションを追加します。
void ActionWait( float fSeconds = 0.0 );
Parameters
fSeconds
待機させる時間(秒)(デフォルト:0.0)
Description
ActionWait()は、objectのアクションキューに、キュー内の他のアクションを実行する前に、fSecond秒間待機させるアクションを追加します。
Remarks
後に続くアクションの前に、NPCやその他のobjectがしてたことを中断させるために、ActionWait()は有効です。
注意として、ActionWaitはスクリプトの実行中にポーズをすることは「ありません」−なにもしないのです。(オブジェクトのアクションの実行よりむしろ)プログラム内部の一部の実行を遅らせたいならば、代わりに実行スクリプト上にDelayCommand()を使用すべきです。
Version
1.22
Example
/* NPCのスクリプトで、このプログラムは * NPCをウェイポイント("WP_LOOKING_1")に歩かし、
* "Is anyone there?"(誰かいるか?)と叫ばせ、5秒間返事を待たせ、
* ふさわしい失望をさせるというアクションをキューに並べる */
ActionMoveToObject(GetObjectByTag("WP_LOOKING_1"));
ActionSpeakString("Is anyone there ");
ActionWait(5.0);
ActionSpeakString("Dang!");
// --- NPC/NPC conversation ---
/* トリガーのOnEnterスクリプト用のアクションであるこのシーンは
* 2人の近くにいるNPC同士の短い会話を演出する */
object oFrodo = GetObjectByTag("Frodo");
object oSam = GetObjectByTag("Sam");
AssignCommand(oSam, ActionWait(2.0));
AssignCommand(oFrodo, ActionSpeakString("Oh, Sam, will we ever make it to Mordor "));
AssignCommand(oFrodo, ActionWait(4.0));
AssignCommand(oSam, ActionSpeakString("Of course we will, Master Frodo, if that pesky Gollum doesn't strangle us first."));
AssignCommand(oSam, ActionWait(4.0));
AssignCommand(oFrodo, ActionSpeakString("You're always so cheerful, Sam. I'm glad we're pals");
AssignCommand(oSam, ActionSpeakString("Pals When this is over, you and I are going to have a long talk about the definition of 'walking holiday'.");
See Also
| functions: | AssignCommand | DelayCommand |
| categories: | Action on Object Functions | Miscellaneous Functions | Time Functions |
author: Iskander Merriman, editor: Dave Robinson, JP team: Rainie
Send comments on this topic.