OverrideEncounterZoneAnchorPoint
Tracking Issue: #500
Tags: events
The OverrideEncounterZoneAnchorPoint
event allows mods to override
the anchor point for determining encounter zones for patrolling pods.
X, Y and Z components of the tuple should be treated as components of the Anchor Point's vector coordinates.
OverrideEncounterZoneAnchorPoint event
Param | Value |
---|---|
EventID | OverrideEncounterZoneAnchorPoint |
EventData | XComLWTuple |
EventSource | XComGameState_AIGroup |
NewGameState | none |
Tuple contents
Index | Name | Type | Direction |
---|---|---|---|
0 | X | float | inout |
1 | Y | float | inout |
2 | Z | float | inout |
Listener template
static function EventListenerReturn OnOverrideEncounterZoneAnchorPoint(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
local XComGameState_AIGroup AIGroup;
local XComLWTuple Tuple;
local float X;
local float Y;
local float Z;
AIGroup = XComGameState_AIGroup(EventSource);
Tuple = XComLWTuple(EventData);
X = Tuple.Data[0].f;
Y = Tuple.Data[1].f;
Z = Tuple.Data[2].f;
// Your code here
Tuple.Data[0].f = X;
Tuple.Data[1].f = Y;
Tuple.Data[2].f = Z;
return ELR_NoInterrupt;
}
This allows mods to override the LoP anchor point for the encounter zone. By default, the encounter zone adjusts to the current location of the XCOM squad.
As an example, a mod could use the XCOM's spawn location instead so that the encounter zones remain the same regardless of where the XCOM squad is currently.