PWSetMinLocalIntParty

From NWN Lexicon


Contents

[edit] 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
);

[edit] 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.


[edit] Description

Sets a local integer variable for all players in a player's party.



[edit] 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.

[edit] Requirements

#include " nw_i0_plotwizard "


[edit] Version

???

[edit] 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);
}

[edit] See Also

functions: 

SetLocalInt



author: Baragg, editor: Mistress

Personal tools
Categories