FinalizePlayerStateForTacticalMusic
Tracking Issue: #1153
Tags: events
Determines the next music cue for changing music during tactical engagements.
This determination is done by looking at multiple factors such as enemy alert level and how many units XCom can see. To do this, it requires knowledge of which player team is active.
To allow for better compatibility between mods which manage player activity and mods which manage sound options, there is one event which will allow to override the player state or its parameters.
FinalizePlayerStateForTacticalMusic event
Param | Value |
---|---|
EventID | FinalizePlayerStateForTacticalMusic |
EventData | XComLWTuple |
EventSource | XComTacticalSoundManager |
NewGameState | none |
Tuple contents
Index | Name | Type | Direction |
---|---|---|---|
0 | PlayerState | XComGameState_Player | inout |
Listener template
static function EventListenerReturn OnFinalizePlayerStateForTacticalMusic(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
local XComTacticalSoundManager SoundManager;
local XComLWTuple Tuple;
local XComGameState_Player PlayerState;
SoundManager = XComTacticalSoundManager(EventSource);
Tuple = XComLWTuple(EventData);
PlayerState = XComGameState_Player(Tuple.Data[0].o);
// Your code here
Tuple.Data[0].o = PlayerState;
return ELR_NoInterrupt;
}