GetLastPerceived()
OnPerceptionイベントで最後に知覚したクリーチャーを決定します。
object GetLastPerceived();
Description
これはOnPerceptionスクリプトで使用し、知覚したObjectを得るために使用します。
知覚したObject、または呼出者が有効なクリーチャーでなければOBJECT_INVALIDを返します。
Version
1.22
Example
// 知覚した敵を攻撃するOnPerceptionスクリプト
main()
{
object oNoticed = GetLastPerceived();
if(GetIsObjectValid(oNoticed))
{
if (GetLastPerceptionSeen() && GetIsEnemy(oNoticed))
{
ClearAllActions();
ActionAttack(oNoticed);
}
}
}
See Also
| categories: | Perception Functions |
author: Tom Cassiotis, editor: Kristian Markon, JP team: Rainie
Send comments on this topic.