alberttheprince / rpemotes-reborn

Community driven FiveM emote menu with human, animal, and prop support.
GNU General Public License v3.0
52 stars 34 forks source link

[BUG] Weird animation cancel and next emote play behaviour #54

Open iSentrie opened 1 week ago

iSentrie commented 1 week ago

Noticed this while making new animations. BUG 1. As can be seen in video, once animation is canceled it for some reason looks like being called again and then exit plays. BUG 2. When trying to play next emote it first cancels current one and doesn't play next one, you have to call it twice to work.

Exit animation:

    ["handsdown"] = {
        "random@mugging5",
        "ig_2_guy_exit_handsup",
        "Hands down",
        AnimationOptions = {
            EmoteDuration = 2250,
            StartDelay = 600,
            EmoteMoving = true
        }
    },
    ["handsdown3"] = {
        "anim@mp_player_intuppersurrender",
        "exit",
        "Hands down 2",
        AnimationOptions = {
            EmoteDuration = 800,
            StartDelay = 600,
            EmoteMoving = true
        }
    },

Animation:

    ['handsup6'] = {
        'random@mugging5',
        'ig_2_guy_enter_handsup',
        'Hands Up 6',
        AnimationOptions = {
            EmoteMoving = true,
            EmoteLoop = false,
            ExitEmote = "handsdown",
            ExitEmoteType = "Exits"
        }
    },
    ["handsup7"] = {
        "anim@mp_player_intuppersurrender",
        "idle_a",
        "Hands Up 7",
        AnimationOptions = {
            EmoteMoving = true,
            EmoteLoop = true,
            ExitEmote = "handsdown3",
            ExitEmoteType = "Exits"
        }
    },

BUG 1 showcase:

https://github.com/user-attachments/assets/ef7f3d39-3f4c-40cc-af91-26f68778c7b8

BUG 2 showcase:

https://github.com/user-attachments/assets/32a7ad03-fa01-41ad-935f-9eb3dd406df2

alberttheprince commented 1 week ago

This is unique to some animations I think, I'm not sure specifically why it is, but for example in our hands up script we use that animation. The player themselves does not see that stutter, but other players will see (like the video I shared in the hands up video):

https://github.com/user-attachments/assets/b74c4ebd-2879-4e39-a428-9b36127765e7