[HELP] Object animation

Hi guys, I have created object model in blender and it looks like this

Then, I have created an animation to be able to open the lid in game

In codewalker (rpf explorer) everything works fine, but after I streamed the object and the animation into the game I’m not able to play the animation on the entity. It’s just there and nothing happens
image

That’s the code I’m temporary using to spawn the object and to play anim:

RegisterCommand("case", function()
    local model = `strikezone_case` -- gta object: xm_prop_x17_chest_closed
    while not HasModelLoaded(model) do
        RequestModel(model)
        Citizen.Wait(10)
    end
    local ped = PlayerPedId()
    local coords = GetEntityCoords(ped)
    local object = CreateObject(model, coords.x, coords.y, coords.z, false, true, true)
    SetModelAsNoLongerNeeded(model)
    PlaceObjectOnGroundProperly(object)
    local animDict = "clip@strikezone_case" -- gta anim: anim@treasurehunt@hatchet@action
    while not HasAnimDictLoaded(animDict) do
        RequestAnimDict(animDict)
        Citizen.Wait(10)
    end
    PlayEntityAnim(object, "opening", animDict, 1000.0, false, true, false, 0.0, false) -- gta anim name: hatchet_pickup_chest
    print(GetAnimDuration(animDict, "opening")) -- prints 1.0 (and that's the actual time of the animation so it's correct)
    Citizen.Wait(5000)
    print("done")
    DeleteEntity(object)
    RemoveAnimDict(animDict)
end)

I also checked the code with gta’s object and gta’s animation - everything worked fine.
To create object & animation I used Blender 3.6 with Sollumz 2.1.
Does anyone know what may cause the issue?

2 Likes

Push help me too :frowning:

I finally made it, the issue was in prop (like bad flags, bones etc). The main bode should be rotated 90 degrees (on X axis) and the flags are 655872 if I remember correctly

@STACHY225 this prop looks good, I’ve been trying to find a way to export from sollumz on blender to ydr or in game entity without animation. Are you able to reference some good pages or videos? or any instructions that can help?

I haven’t found any pages nor videos with this problem. But there was a guy from (if I remember correctly) CodeWalker discord that helped me a lot with this issue, here’s part of his message that may help you
image
If you need more help you can contact me via discord (stachy225), send the .blend file and I’ll do my best to help you :blush:

sent you a request. Thanks for the help so far! The thing is, my prop is not animated, so when I open it up in Codewalker, I can’t see anything so far. Fairly new to this game, but i know my way around blender.