Jump to content

engineReplaceAnimation for peds not working


Skream

Recommended Posts

Is it just me or engineReplaceAnimation don't work for peds at moment? Worked fine for me for players. I'm just asking it here to make sure before report it as a bug in github

 

I also tried to replace the animation everytime the ped streamIn but still nothing.

Edited by Skream
Link to comment
21 minutes ago, Saml1er said:

Show your code.

function initAnimations()
	for animBlock, animsTable in pairs(animData) do
		engineLoadIFP(':rio-modpack/animation/ifp/' .. animBlock .. '.ifp', animBlock)
	end 
	
	local playersPool, pedsPool = getElementsByType('player'), getElementsByType('ped')
	
	replaceAnimations(localPlayer)
	
	for _, thePlayer in pairs(playersPool) do 
		if getElementData(thePlayer, 'character:logged_in') then 
			replaceAnimations(thePlayer)
		end 
	end
	
	for _, thePed in pairs(pedsPool) do 
		replaceAnimations(thePed)
	end
end 

addEventHandler('onClientResourceStart', resourceRoot, initAnimations)

function replaceAnimations(theElement)
	for animBlock, animsTable in pairs(animData) do
		for _, animName in pairs(animsTable) do
			engineReplaceAnimation(theElement, animBlock, animName, animBlock, animName)
		end		
	end 
end 

 

I also tried to do this either

 

addEventHandler('onClientElementStreamIn', root, function()
	local elemType = getElementType(source)
	
	if elemType == 'ped' or elemType == 'player' then 
		replaceAnimations(source)
	end 
end)

it works fine for players but ped doesn't

Edited by Skream
Link to comment
9 minutes ago, Saml1er said:

Which animation doesn't work for peds? Is it idle animation?

I have a large IA system for NPCs. They use different animations, at least 30 different animations (100+ peds). It seems to not work at all.

I'm using the 1.5.6 version on mta.sa

They even respond to certain situations like aiming at them or shooting, getting injured or getting close so animations changes constantly

 

I'm using the gta v ped.ifp that comes with ifp_demo

Edited by Skream
Link to comment

try ped handsup for example

6 minutes ago, Saml1er said:

Can you name one animation that is not working? Is it a partial animation? It'll be better if you provide me with a basic resource so I can reproduce the problem.

sorry I can't copy n past its not that simple cuz I load peds from database they have a default animation (as I said most case unique, database stored) and it changes based with the situation

I could record it do you have discord? 

Edited by Skream
Link to comment
18 minutes ago, Skream said:

try ped handsup for example

sorry I can't copy n past its not that simple cuz I load peds from database they have a default animation (as I said most case unique, database stored) and it changes based with the situation

I could record it do you have discord? 

 Discord: saml1er#8752

Okay, show me the recording then.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...