How does MovementAnimationSet works? I want to set ped's movement animation and then task him to enter vehicle with this movement style. I was trying:
RevivedPed.MovementAnimationSet = "move_m@injured"; RevivedPed.Task.EnterVehicle(Team.Ambulance, IsDriver ? VehicleSeat.LeftRear : VehicleSeat.RightRear);
here are working examples
SpawnedPed.Task.PlayAnimation("mini@strip_club@private_dance@part2", "priv_dance_p2", 8f, -1, AnimationFlags.Loop);
CurrentPed.Task.EnterVehicle(LastVehicle, VehicleSeat.Driver, -1, 0.0F, 0);
@JohnFromGWN Not working for me
@JohnFromGWN I found a diffrent way:
RevivedPed.Task.EnterVehicle(Team.Ambulance, IsDriver ? VehicleSeat.LeftRear : VehicleSeat.RightRear);
if (!Function.Call<bool>(Hash.HAS_ANIM_SET_LOADED, "move_m@injured"))
Function.Call(Hash.SET_PED_MOVEMENT_CLIPSET, RevivedPed.Handle, "move_m@injured", 0x3E800000);
@Hermes1312 where did you declare your peds?
The vehicle script i posted is standard and unless you tried to use it without declaring them i don't see any possibility of it failing.
Animations are a different story, the one you chose obviously depended on being loaded, mine didn't.
@Hermes1312 When I post code, I test it first
@JohnFromGWN Wait a second why did u applied animation to SpawnedPed and gave Task to CurrentPed i meant to apply movement style for eg. Ped1 and then tell this Ped1 to enter vehicle with specified movement style.
@Hermes1312 just 2 separate unrelated snippets from my own code, sorry for any confusion.
@JohnFromGWN No problem you helped me anyway