GetLastPlayerDied()
最後に死んだPCを得ます。
object GetLastPlayerDied();
Description
最後に死んだプレイヤーを得る為の、モジュールのOnPlayerDeath()スクリプトにこの関数を使用してください。
最後に死んだPCを返します。
Remarks
死のペナルティや、復活時の状態、評判初期化等を改造する為にOnPlayerDeath()で使ってください
Version
1.22
Example
// BiowareのDavid Gaider氏のスクリプトFAQより
// I'm creating a custom 'ClearAll FactionMembers' command, here
// first declaring the api for the new command, then what it does
// I could reasonably have put this in a seperate script and
// used #include to put it into this script (and others), as well
void ClearAllFactionMembers (object oMember, object oPlayer)
{
object oClear = GetFirstFactionMember (oMember, FALSE);
while (GetIsObjectValid(oClear) == TRUE)
{
ClearPersonalReputation (oPlayer, oClear);
oClear = GetNextFactionMember (oMember, FALSE);
}
}
// here's the main body of my script
void main()
{
// identify the player
object oPlayer = GetLastPlayerDied();
// identify a member of the faction. I'm assuming these members are alive.
// Otherwise, I would have to try several things to turn up a member that is
// first valid and then do the if command
object oGoblin = GetObjectByTag("GOBLIN1");
if (GetIsObjectValid(oGoblin))
{
// adjust the faction relation back up by 100
AdjustReputation (oPlayer, oGoblin, 100);
// run my custom command to cycle through the faction
ClearAllFactionMembers (oGoblin, oPlayer);
}
}
See Also
| functions: | GetLastPlayerDying |
| categories: | PC Only Functions |
| events: | OnDeath Event |
author: Tom Cassiotis, JP team: Rainie
Send comments on this topic.