Difference between revisions of "EVENT TYPE SET PLOT"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(split out of event)
 
(formatting)
Line 1: Line 1:
*<b>Sent When:</b> A plot is setting a plot flag
+
{{Event
*<b>Sent From:</b> engine
+
|when= A plot is setting a plot flag
*<b>Sent To:</b> plot script
+
|from= [[engine]]
 
+
|to= plot script
Parameters:
+
|creatorname= oParty
*<b>Creator:</b> owner of the plot table, should be a player
+
|creatordesc= owner of the plot table, should be a player
*<b>String 0:</b> plot GUID, defined as string constant
+
|string0name= sPlot
*<b>Int 1:</b> bit flag number being affected
+
|string0desc= plot GUID, defined as string constant
*<b>Int 2:</b> the value about to be written (on a normal SET that should be '1', and on a 'clear' it should be '0')
+
|int1name=nFlag
*<b>Int 3:</b> On SET call, the current flag value (can be either 1 or 0 regardless if it's a set or clear event)
+
|int1desc= bit flag number being affected
*<b>Int 4:</b> 1 if the current flag (Int 1) is defined, 0 for normal flag.
+
|int2name=nValue
 +
|int2desc= the value about to be written (on a normal SET that should be '1', and on a 'clear' it should be '0')
 +
|int3name=nOldValue
 +
|int3desc= On SET call, the current flag value (can be either 1 or 0 regardless if it's a set or clear event)
 +
|int4name= nIsDefined
 +
|int4desc= 1 if the current flag (Int 1) is defined, 0 for normal flag.
 +
}}
  
 
IMPORTANT: The flag value on a SET event is set only AFTER this script finishes running!
 
IMPORTANT: The flag value on a SET event is set only AFTER this script finishes running!

Revision as of 21:03, 24 July 2009

Source:
[Undocumented]
Sent when:
A plot is setting a plot flag
Sent from:
engine
Sent to:
plot script
Parameters:
  • Creator: owner of the plot table, should be a player
  • Integer 1: bit flag number being affected
  • Integer 2: the value about to be written (on a normal SET that should be '1', and on a 'clear' it should be '0')
  • Integer 3: On SET call, the current flag value (can be either 1 or 0 regardless if it's a set or clear event)
  • Integer 4: 1 if the current flag (Int 1) is defined, 0 for normal flag.
  • String 0: plot GUID, defined as string constant

Usage

case EVENT_TYPE_SET_PLOT:
{
object oParty = GetEventCreator(ev); // owner of the plot table, should be a player
int nFlag = GetEventInteger(ev, 1); // bit flag number being affected
int nValue = GetEventInteger(ev, 2); // the value about to be written (on a normal SET that should be '1', and on a 'clear' it should be '0')
int nOldValue = GetEventInteger(ev, 3); // On SET call, the current flag value (can be either 1 or 0 regardless if it's a set or clear event)
int nIsDefined = GetEventInteger(ev, 4); // 1 if the current flag (Int 1) is defined, 0 for normal flag.
string sPlot = GetEventString(ev, 0); // plot GUID, defined as string constant

// insert event-handling code here

break;
}

IMPORTANT: The flag value on a SET event is set only AFTER this script finishes running!