PWSetMinLocalIntParty(object, string, int)
Sets a local integer variable for all players in a player's party.
void PWSetMinLocalIntParty( object oPC, string sVarName, int nValue );
Parameters
oPC
The player object used to reference the party.
sVarName
The name of the local integer to test for.
nValue
The value to update sVarName to be.
Description
Sets a local integer variable for all players in a player's party.
Remarks
Each player in oPC's group is checked for a local integer named sVarName. If the group member's saved value for sVarName is less than nValue, then the local integer is updated to nValue on that group member.
Requirements
#include "nw_i0_plotwizard"
Version
???
Example
// When a player kills this beastie, update the group's plot flag.
// This script goes in the beastie's OnDeath event.
#include "nw_i0_plotwizard"
void main()
{
// Who killed the beastie?
object oPC = GetLastKiller();
// Make sure we are dealing with a player not a player's pet.
if(FALSE == GetIsPC(GetMaster(oPC)))
{ oPC = GetMaster(oPC); }
// Update oPC's group that they have slain the beastie.
PWSetMinLocalIntParty(oPC, "BOSS_BEASTIE_KILLED", 1);
}
See Also
| functions: | GetLocalInt | PWSetMinLocalIntPartyPCSpeaker | SetLocalInt |
| categories: | Local Variables Functions |
author: Baragg, editor: Mistress