If you die while the Interact ability message is displayed, the Interact ability message will be displayed at the time of respawn.

ymo

Member
If you die while the Interact ability message is displayed, the Interact ability message will be displayed at the time of respawn.

I'm using UCC version 2.2.7

The latest version does not have this issue,
I can't because updating will destroy the project
What are the changes to the script from the 2.2.7 version?
How can I fix this problem?

Video
 
Even after the player dies and respawns
Interact ability remains CanStartAbility true.

I want to reset interact ability CanStartAbility to false when respawning.
 
I do remember fixing this in one of the later versions, though I don't remember the fix. I would try comparing the UI monitors with the version that you are running to see if you can track it down.
 
I do remember fixing this in one of the later versions, though I don't remember the fix. I would try comparing the UI monitors with the version that you are running to see if you can track it down.
I compared the differences and changed as follows, but the problem was not solved.
Please help!

C#:
        private void OnAbilityCanStart(Ability ability, bool canStart)
        {
            // Only one ability message can be shown at a time.
           
//Added  && m_Ability.Index < ability.Index
            if (m_Ability != null && m_Ability != ability && m_Ability.Index < ability.Index) {
                return;
            }

            if (canStart && (!string.IsNullOrEmpty(ability.AbilityMessageText) || ability.AbilityMessageIcon != null)) {
                m_Ability = ability;
                m_ShouldFade = false;

//Added m_ObjectPickup = null;
                m_ObjectPickup = null;

                if (m_ScheduledFade != null) {
                    Scheduler.Cancel(m_ScheduledFade);
                    m_ScheduledFade = null;
                }
//Added if (!canStart)
            }
            else if (!canStart)
            {
                m_Ability = null;
            }
            UpdateMessage();
        }
 
Can you tell me how to reproduce the issue within a fresh project? Last time I tested it it was fixed.
 
Can you tell me how to reproduce the issue within a fresh project? Last time I tested it it was fixed.
I'm trying to port the latest version of Interact code to UCC version 2.2.4.
At the time of death, Interact Trigger Exit will not be called, so the ability message will remain displayed. Even if the ability is executed,
the ability message is displayed repeatedly.
 
Version 2.2.4 is extremely old and there have been a bunch of fixes since then so unfortunately I am not able to support that version. If you can reproduce it with the latest though I can definitely take a look.
 
Version 2.2.4 is extremely old and there have been a bunch of fixes since then so unfortunately I am not able to support that version. If you can reproduce it with the latest though I can definitely take a look.

I Create the following custom UCC event in Interact.cs

C#:
        private void InteractDeath_Reset()
        {
            m_Interactable = null;
            m_DetectedTriggerObjectsCount = 0;
            m_DetectedObject = null;
        }

C#:
EventHandler.ExecuteEvent(gameObject, "OnInteractDeath_Reset");

I Changed to call custom UCC event in CharacterRespawner OnSpawn event.
As a result, the problem was solved.
 
Top