Difference between revisions of "EVENT TYPE SET PLOT"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(split out of event)
 
m (Fixing a parameter)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
*<b>Sent When:</b> A plot is setting a plot flag
+
{{Event
*<b>Sent From:</b> engine
+
|sourcefile  = script.ldf
*<b>Sent To:</b> plot script
+
|when        = A plot is setting a plot flag
 
+
|from        = [[engine]]
Parameters:
+
|to          = plot script
*<b>Creator:</b> owner of the plot table, should be a player
+
|tocategory1 = plot
*<b>String 0:</b> plot GUID, defined as string constant
+
|sortkey    = SET_PLOT
*<b>Int 1:</b> bit flag number being affected
+
|creatorname = oCreator
*<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')
+
|creatordesc = owner of the plot table, should be a player
*<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)
+
|string0name = sPlot
*<b>Int 4:</b> 1 if the current flag (Int 1) is defined, 0 for normal flag.
+
|string0desc = plot GUID, defined as string constant
 +
|int1name    = nFlag
 +
|int1desc    = bit flag number being affected
 +
|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!
  
[[Category:Event types|SET_PLOT]]
+
[[Category:Plot events|SET_PLOT]]
[[Category:Plots]]
+

Latest revision as of 17:52, 4 March 2012

Source:
script.ldf
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 oCreator = 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!