Wingmask Stand Animation

12/23/2018 20:22 Kakerou#1
Hi, anyone knows how wingmask animate during standing of the character like insanity flyff?

I have wing model with walk and stand animation. But ingame, the stand animation is not working.

see .gif below;

[Only registered and activated users can see links. Click Here To Register...]
12/23/2018 20:41 MrDemian#2
Code:
if (pRideProp && pRideProp->dwID == II_RID_RID_BOR_LADOLF || pRideProp->dwID == II_RID_RID_BOR_JLADOLF
#if __VER >= 9
				|| pRideProp->dwID == II_RID_RID_BOR_JLADOLF_S || pRideProp->dwID == II_RID_RID_BOR_LADOLF_S
#endif	//
				)
			{
				if (m_pLadolf == NULL)
				{
					m_pLadolf = new CModelObject;
					m_pLadolf->InitDeviceObjects(pd3dDevice);
					m_pLadolf->LoadBone("mvr_Ladolf.chr");
					m_pLadolf->LoadElement("mvr_Ladolf.o3d", 0);
					m_pLadolf->LoadMotion("mvr_Ladolf_stand.ani");
				}

				D3DXMATRIX mLadolf = mRide;
				D3DXVECTOR3 vLocal;

				FLOAT fAngXZ = GetAngle();
				FLOAT fAngH = GetAngleX();
				AngleToVector(&vLocal, fAngXZ, -fAngH - 10.0f, 1.4f);

				// ³¯±â ½ÃÀÛ - °¡¼ÓÁß
				if (m_pActMover->GetStateFlag() & OBJSTAF_ACC)
				{
					if (m_dwLadolfFlag == 0)
					{
						m_pLadolf->LoadMotion("mvr_Ladolf_walk.ani");
						m_pLadolf->SetMotionBlending(TRUE);
						m_pLadolf->SetLoop(ANILOOP_LOOP);
						m_dwLadolfFlag = 1;
					}
				}
				else
				{
					if (D3DXVec3LengthSq(&m_pActMover->m_vDelta) < 0.001f)
					{
						if (m_dwLadolfFlag == 1)
						{
							m_pLadolf->LoadMotion("mvr_Ladolf_stand.ani");
							m_pLadolf->SetMotionBlending(TRUE);
							m_pLadolf->SetLoop(ANILOOP_LOOP);
							m_dwLadolfFlag = 0;
						}
					}
				}

				mLadolf._41 += vLocal.x;
				mLadolf._42 += vLocal.y;
				mLadolf._43 += vLocal.z;

				m_pLadolf->m_nNoEffect = m_pModel->m_nNoEffect;
				m_pLadolf->Render(pd3dDevice, &mLadolf);
				m_pLadolf->m_nNoEffect = 0;
			}
You'll have to change the entire code but this is the base. Merry Christmas!
12/24/2018 02:41 Kakerou#3
Quote:
Originally Posted by MrDemian View Post
Code:
if (pRideProp && pRideProp->dwID == II_RID_RID_BOR_LADOLF || pRideProp->dwID == II_RID_RID_BOR_JLADOLF
#if __VER >= 9
				|| pRideProp->dwID == II_RID_RID_BOR_JLADOLF_S || pRideProp->dwID == II_RID_RID_BOR_LADOLF_S
#endif	//
				)
			{
				if (m_pLadolf == NULL)
				{
					m_pLadolf = new CModelObject;
					m_pLadolf->InitDeviceObjects(pd3dDevice);
					m_pLadolf->LoadBone("mvr_Ladolf.chr");
					m_pLadolf->LoadElement("mvr_Ladolf.o3d", 0);
					m_pLadolf->LoadMotion("mvr_Ladolf_stand.ani");
				}

				D3DXMATRIX mLadolf = mRide;
				D3DXVECTOR3 vLocal;

				FLOAT fAngXZ = GetAngle();
				FLOAT fAngH = GetAngleX();
				AngleToVector(&vLocal, fAngXZ, -fAngH - 10.0f, 1.4f);

				// ³¯±â ½ÃÀÛ - °¡¼ÓÁß
				if (m_pActMover->GetStateFlag() & OBJSTAF_ACC)
				{
					if (m_dwLadolfFlag == 0)
					{
						m_pLadolf->LoadMotion("mvr_Ladolf_walk.ani");
						m_pLadolf->SetMotionBlending(TRUE);
						m_pLadolf->SetLoop(ANILOOP_LOOP);
						m_dwLadolfFlag = 1;
					}
				}
				else
				{
					if (D3DXVec3LengthSq(&m_pActMover->m_vDelta) < 0.001f)
					{
						if (m_dwLadolfFlag == 1)
						{
							m_pLadolf->LoadMotion("mvr_Ladolf_stand.ani");
							m_pLadolf->SetMotionBlending(TRUE);
							m_pLadolf->SetLoop(ANILOOP_LOOP);
							m_dwLadolfFlag = 0;
						}
					}
				}

				mLadolf._41 += vLocal.x;
				mLadolf._42 += vLocal.y;
				mLadolf._43 += vLocal.z;

				m_pLadolf->m_nNoEffect = m_pModel->m_nNoEffect;
				m_pLadolf->Render(pd3dDevice, &mLadolf);
				m_pLadolf->m_nNoEffect = 0;
			}
You'll have to change the entire code but this is the base. Merry Christmas!

Thanks for response bro, but this code is the same as mine x.x
12/25/2018 05:56 xToffer#4
I think the pma_wing is the base you have to do some changes in the code.
12/25/2018 10:32 thetoys#5
Edit mover.cpp
12/25/2018 17:53 MrDemian#6

This should do it, havnt checked the source just rewrote the code from this Thread
Code:
if(g_pPlayer)
{
	CItemElem* pWings = g_pPlayer->GetEquipItem(PARTS_CLOAK); //Change it to your Parts Define
	if(pWings)
	{
		if (m_pWingModel == NULL) //New CModelObject
		{
			m_pWingModel = new CModelObject;
			m_pWingModel->InitDeviceObjects(pd3dDevice);
			m_pWingModel->LoadBone("mvr_Ladolf.chr"); //mvr whatever 
			m_pWingModel->LoadElement("mvr_Ladolf.o3d", 0); //
			m_pWingModel->LoadMotion("mvr_Ladolf_stand.ani");//
		}
	
		if (g_pPlayer->m_pActMover->GetStateFlag() == OBJSTAF_WALK)
		{
			m_pWingModel->LoadMotion("mvr_Ladolf_walk.ani");
			m_pWingModel->SetMotionBlending(TRUE);
			m_pWingModel->SetLoop(ANILOOP_LOOP);
		}
		else
		{
			m_pWingModel->LoadMotion("mvr_Ladolf_stand.ani");
			m_pWingModel->SetMotionBlending(TRUE);
			m_pWingModel->SetLoop(ANILOOP_LOOP);
		}
	m_pWingModel->m_nNoEffect = m_pModel->m_nNoEffect; //Sfx
	m_pWingModel->Render(pd3dDevice, &mLadolf);
	m_pWingModel->m_nNoEffect = 0;
	}
}
12/26/2018 06:06 thetoys#7
I think it's very easy.
Just edit the code in mover.cpp.
12/30/2018 13:35 xToffer#8
Quote:
Originally Posted by MrDemian View Post

This should do it, havnt checked the source just rewrote the code from this Thread
Code:
if(g_pPlayer)
{
	CItemElem* pWings = g_pPlayer->GetEquipItem(PARTS_CLOAK); //Change it to your Parts Define
	if(pWings)
	{
		if (m_pWingModel == NULL) //New CModelObject
		{
			m_pWingModel = new CModelObject;
			m_pWingModel->InitDeviceObjects(pd3dDevice);
			m_pWingModel->LoadBone("mvr_Ladolf.chr"); //mvr whatever 
			m_pWingModel->LoadElement("mvr_Ladolf.o3d", 0); //
			m_pWingModel->LoadMotion("mvr_Ladolf_stand.ani");//
		}
	
		if (g_pPlayer->m_pActMover->GetStateFlag() == OBJSTAF_WALK)
		{
			m_pWingModel->LoadMotion("mvr_Ladolf_walk.ani");
			m_pWingModel->SetMotionBlending(TRUE);
			m_pWingModel->SetLoop(ANILOOP_LOOP);
		}
		else
		{
			m_pWingModel->LoadMotion("mvr_Ladolf_stand.ani");
			m_pWingModel->SetMotionBlending(TRUE);
			m_pWingModel->SetLoop(ANILOOP_LOOP);
		}
	m_pWingModel->m_nNoEffect = m_pModel->m_nNoEffect; //Sfx
	m_pWingModel->Render(pd3dDevice, &mLadolf);
	m_pWingModel->m_nNoEffect = 0;
	}
}
this work?