GetLawChaosValue(object)

Used to find an object's law/chaos value.

int GetLawChaosValue(
    object oCreature
);

Parameters

oCreature

Object to determine law / chaos value for.


Description

Returns an integer between 0 and 100 (inclusive) to represent oCreature's Law/Chaos alignment (100=law, 0=chaos)
Return value if oCreature is not a valid creature: -1



Known Bugs

Previously noted bugs have been fixed in a patch some time ago.


Version

1.30

Example

// Sends a message to the first player indicating their law value 
void main()
{
    int iChaosLaw = GetLawChaosValue(GetFirstPC());
    SendMessageToPC(GetFirstPC(),"Your Law/Chaos Value == " + IntToString(iChaosLaw));
}

See Also

functions: GetAlignmentGoodEvil | GetAlignmentLawChaos | GetFactionAverageGoodEvilAlignment | GetFactionAverageLawChaosAlignment | GetGoodEvilValue
categories: Alignment Functions | Get Data from Creature Functions


 author: GoLeM, editor: Lilac Soul, additional contributor(s): Lilac Soul