CopyLocals(object, object)
レベルの低いヘンチマンから新しいヘンチマンへ、ローカル値をコピーします。
void CopyLocals( object oSource, object oTarget );
Parameters
oSource
以前のヘンチマン
oTarget
新しいヘンチマン
Description
レベルの低いヘンチマンから新しいヘンチマンへ、ローカル値をコピーします。
Remarks
Found in: nw_i0_henchman.nss: 378
oSource上で見つかる変数をoTarget上に設定します。これらの変数は、多分SetBeenHired()から別れ、公式キャンペーンでのみ有効で、我々がこの関数を使うためには少し調整が必要だと思われます。
Requirements
#include "nw_i0_henchman"
Version
1.22
Example
// この関数のversion1.28用ソース
void CopyLocals(object oSource, object oTarget)
{
// AssignCommand(PC(), SpeakString("in here"));
// AssignCommand(oTarget, SpeakString("I exist"));
if (GetIsObjectValid(oTarget) == FALSE)
{
AssignCommand(PC(), SpeakString("Target invalid"));
}
else
if (GetIsObjectValid(oSource) == FALSE)
{
AssignCommand(PC(), SpeakString("Source invalid"));
}
SetBeenHired(GetBeenHired(oSource), oTarget);
SetStoryVar(1, GetStoryVar(1, oSource), oTarget);
SetStoryVar(2, GetStoryVar(2, oSource), oTarget);
SetStoryVar(3, GetStoryVar(3, oSource), oTarget);
SetLocalInt(oTarget, "NW_ASSOCIATE_MASTER", GetLocalInt(oSource, "NW_ASSOCIATE_MASTER"));
// AssignCommand(PC(),SpeakString(IntToString(GetLocalInt(oSource, "NW_ASSOCIATE_MASTER"))));
// AssignCommand(PC(),SpeakString(IntToString(GetLocalInt(oTarget, "NW_ASSOCIATE_MASTER"))));
}
See Also
| functions: | SetBeenHired |
| categories: | Henchmen/Familiars/Summoned Functions |
author: Lilac Soul, JP team: Rainie
Send comments on this topic.