Difference between revisions of "EVENT TYPE SET PLOT"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m (remove redundant category)
m (Fixing a parameter)
 
Line 1: Line 1:
 
{{Event
 
{{Event
|sourcefile=script.ldf
+
|sourcefile = script.ldf
|when= A plot is setting a plot flag
+
|when       = A plot is setting a plot flag
|from= [[engine]]
+
|from       = [[engine]]
|to= plot script
+
|to         = plot script
|tocategory1=plot
+
|tocategory1 = plot
|sortkey=SET_PLOT
+
|sortkey     = SET_PLOT
|creatorname= oParty
+
|creatorname = oCreator
|creatordesc= owner of the plot table, should be a player
+
|creatordesc = owner of the plot table, should be a player
|string0name= sPlot
+
|string0name = sPlot
|string0desc= plot GUID, defined as string constant
+
|string0desc = plot GUID, defined as string constant
|int1name=nFlag
+
|int1name   = nFlag
|int1desc= bit flag number being affected
+
|int1desc   = bit flag number being affected
|int2name=nValue
+
|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')
+
|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
+
|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)
+
|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
+
|int4name   = nIsDefined
|int4desc= 1 if the current flag (Int 1) is defined, 0 for normal flag.
+
|int4desc   = 1 if the current flag (Int 1) is defined, 0 for normal flag.
 
}}
 
}}
  

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!