OverrideReactionFireSlomo
Tracking Issue: #996
Tags: events
Normally cinematic slo-mo is automatically added to abilities that use X2AbilityToHitCalc_StandardAim
(or its subclass) with bReactionFire = true
, which will also modify the ability's hit chance.
The OverrideReactionFireSlomo
event allows mods to add cinematic slo-mo to non-reaction abilities,
and remove cinematic slo-mo from reaction abilities.
FiringAbilityContext can be used to access ability's Template Name:
FiringAbilityContext.InputContext.AbilityTemplateName
.
OverrideReactionFireSlomo event
Param | Value |
---|---|
EventID | OverrideReactionFireSlomo |
EventData | XComLWTuple |
EventSource | X2ReactionFireSequencer |
NewGameState | none |
Tuple contents
Index | Name | Type | Direction |
---|---|---|---|
0 | bIsReactionFire | bool | inout |
1 | FiringAbilityContext | XComGameStateContext_Ability | in |
Listener template
static function EventListenerReturn OnOverrideReactionFireSlomo(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
local X2ReactionFireSequencer ReactionFireSequencer;
local XComLWTuple Tuple;
local bool bIsReactionFire;
local XComGameStateContext_Ability FiringAbilityContext;
ReactionFireSequencer = X2ReactionFireSequencer(EventSource);
Tuple = XComLWTuple(EventData);
bIsReactionFire = Tuple.Data[0].b;
FiringAbilityContext = XComGameStateContext_Ability(Tuple.Data[1].o);
// Your code here
Tuple.Data[0].b = bIsReactionFire;
return ELR_NoInterrupt;
}