Difference between revisions of "EVENT TYPE BEGIN TRAVEL"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(split off of event)
 
m (Updating link)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{event
 +
|sourcefile=script.ldf
 +
|when=Player clicks on a map pin
 +
|from={{undocumented}}
 +
|to= [[module]]
 +
|tocategory1=module
 +
|sortkey=BEGIN_TRAVEL
 +
|int0name=nSourceTerrain
 +
|int0desc=The terrain type of the source location
 +
|int1name=nTargetTerrain
 +
|int1desc=The terrain type of the target location
 +
|int2name=nWorldMap
 +
|int2desc=The world map number (a [[WM_*]] constant)
 +
|string0name=sSource
 +
|string0desc=area tag source location
 +
|string1name=sTarget
 +
|string1desc=area tag target location
 +
|string2name=sWPOverride
 +
|string2desc=waypoint tag override
 +
|object0name=oSourceLocation
 +
|object0desc=source location object
 +
}}
  
*<b>Sent When:</b>
+
== Remarks ==
*<b>Sent From:</b>
+
*<b>Sent To: module</b>
+
  
Parameters:
+
The nSourceTerrain and nTargetTerrain parameters are used in the main campaign's code for determining what sort of random encounters to generate, but that's handled entirely in scripting so you can use them for other purposes.
  
*            string sSource = GetEventString(ev, 0); // area tag source location
 
*            string sTarget = GetEventString(ev, 1); // area tag target location
 
*            string sWPOverride = GetEventString(ev, 2); // waypoint tag override
 
*            int nSourceTerrain = GetEventInteger(ev, 0);
 
*            int nTargetTerrain = GetEventInteger(ev, 1);
 
*            int nWorldMap = GetEventInteger(ev, 2);
 
*            object oSourceLocation = GetEventObject(ev, 0); // source location object
 
  
[[Category:Event types|BEGIN_TRAVEL]]
+
[[Category:Map events|BEGIN_TRAVEL]]
[[Category:Maps]]
+

Latest revision as of 19:08, 3 August 2011

Source:
script.ldf
Sent when:
Player clicks on a map pin
Sent from:
[Undocumented]
Sent to:
module
Parameters:
  • Integer 0: The terrain type of the source location
  • Integer 1: The terrain type of the target location
  • Integer 2: The world map number (a WM_* constant)
  • String 0: area tag source location
  • String 1: area tag target location
  • String 2: waypoint tag override
  • Object 0: source location object

Usage

case EVENT_TYPE_BEGIN_TRAVEL:
{
int nSourceTerrain = GetEventInteger(ev, 0); // The terrain type of the source location
int nTargetTerrain = GetEventInteger(ev, 1); // The terrain type of the target location
int nWorldMap = GetEventInteger(ev, 2); // The world map number (a WM_* constant)
string sSource = GetEventString(ev, 0); // area tag source location
string sTarget = GetEventString(ev, 1); // area tag target location
string sWPOverride = GetEventString(ev, 2); // waypoint tag override
object oSourceLocation = GetEventObject(ev, 0); // source location object

// insert event-handling code here

break;
}

Remarks

The nSourceTerrain and nTargetTerrain parameters are used in the main campaign's code for determining what sort of random encounters to generate, but that's handled entirely in scripting so you can use them for other purposes.