7 override void OnActionCanceled(IEntity pOwnerEntity, IEntity pUserEntity)
9 ChimeraCharacter character = ChimeraCharacter.Cast(pUserEntity);
13 CharacterControllerComponent controller = character.GetCharacterController();
20 SCR_ConsumableItemComponent consumableComponent = GetConsumableComponent(character);
21 if (consumableComponent)
22 consumableComponent.SetAlternativeModel(
false);
26 override bool CanBePerformedScript(IEntity user)
29 ChimeraCharacter userCharacter = ChimeraCharacter.Cast(user);
33 SCR_ConsumableItemComponent consumableComponent = GetConsumableComponent(userCharacter);
34 if (!consumableComponent)
38 if (!consumableComponent.GetConsumableEffect().CanApplyEffect(
GetOwner(), userCharacter, reason))
40 if (reason == SCR_EConsumableFailReason.UNDAMAGED)
41 SetCannotPerformReason(m_sNotDamaged);
42 else if (reason == SCR_EConsumableFailReason.ALREADY_APPLIED)
43 SetCannotPerformReason(m_sAlreadyApplied);