ShowOff:OnPCMiscStatChange

From GECK
Jump to: navigation, search

An event handler added by the ShowOff NVSE Plugin version 1.50.

Description

This event runs after a vanilla PC misc stat is changed, such as after ModPCMiscStat is called.

Does NOT account for ModExtraMiscStat.

Dispatched Args

GetSelf / GetSelfAlt will return the Player reference.

The args dispatched to handlers are:

  1. Int: the misc stat's code.
    Codes are listed here
  2. Int: the amount the stat has been modified by.
  3. Int: the new stat's new amount.

Syntax

Use SetEventHandler / SetEventHandlerAlt with the event name "ShowOff:OnPCMiscStatChange".

Handler Script

A skeleton handler script for this event:

scn TestShowOffOnPCMiscStatChangeUDF

begin Function { int iStatCode, int iModVal, int iNewVal }

	ref rPlayer = GetSelfAlt  ; GetSelf would do the same thing here

	printvar iStatCode
	printvar iModVal 
        printvar iNewVal 
	print "TestShowOffOnPCMiscStatChangeUDF >> RAN!"
end

Example

SetEventHandler "ShowOff:OnPCMiscStatChange" TestShowOffOnPCMiscStatChangeUDF

Will register TestShowOffOnPCMiscStatChangeUDF as an event handler for the event.

SetEventHandlerAlt "ShowOff:OnPCMiscStatChange" TestShowOffOnPCMiscStatChangeUDF 1::1

Will register TestShowOffOnPCMiscStatChangeUDF as an event handler for the event. It will only run when the "Locations Discovered" misc stat is changed.

See Also