Jump to content

introselect SetScale


Go to solution Solved by ARiver,

Recommended Posts

  • Premium

Hello everyone, 

 

I have an issue regarding this line in introselect.py :

if chr.RaceToJob(race) == JOB_WOLFMAN:
    chr.SetScale(0.50,0.50,0.50)

 

I can't make this work or at least scaling does nothing ...

here is the pythoncharactermodule.cpp part that i've create for that purpose:

PyObject* chrSetScale(PyObject* poSelf, PyObject* poArgs)
{
	float fScaleX;
	if (!PyTuple_GetFloat(poArgs, 0, &fScaleX))
		return Py_BuildException();

	float fScaleY;
	if (!PyTuple_GetFloat(poArgs, 1, &fScaleY))
		return Py_BuildException();

	float fScaleZ;
	if (!PyTuple_GetFloat(poArgs, 2, &fScaleZ))
		return Py_BuildException();

	CInstanceBase* pCharacterInstance = CPythonCharacterManager::Instance().GetSelectedInstancePtr();

	if (!pCharacterInstance)
		return Py_BuildNone();

	pCharacterInstance->GetGraphicThingInstanceRef().SetScale(fScaleX, fScaleY, fScaleZ);


	return Py_BuildNone();
}

Since I have Lennt Acce and Scaling system I have tried with his SetScale(fScaleX, fScaleY, fScaleZ, true) function too but same result scaling is not affected. 

I have also tried to let the basic SetScale function alone (creating a different SetScaleAcce function for the acce scaling with the same logic using another vector than m_v3Scale like the obj scaling system SetScale function, eveything works fine for acce scaling) but nothing works for character scaling ... 

 

Hope I could get some help here,

Thanks anyway !

 

Best regards !

Link to comment
https://metin2.dev/topic/34019-introselect-setscale/
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Premium
  • Solution

So ... I don't know why but i made it works, i need explanation on the why though if anyone read this post ...

I was playing with the SetScale function ( create a mimic function SeScaleTry and changing some stuff in it ), 

I was trying to change the "D3DXMatrixScaling(&m_ScaleMatrix, m_v3Scale.x, m_v3Scale.y, m_v3Scale.z);" in the setscale function from lennt scaling system : i've tried to change Scale_Matrix with m_woldMatrix it wasn't working but it did work with m_PositionMatrix:

 

void CGraphicObjectInstance::SetScaleTry(float x, float y, float z)
{
	m_v3Scale.x = x;
	m_v3Scale.y = y;
	m_v3Scale.z = z;

	D3DXMatrixScaling(&m_PositionMatrix, m_v3Scale.x, m_v3Scale.y, m_v3Scale.z);
}

 

But why ????

PositionMatrix is an empty matrix only used in Transform() but Transform() is only called when you are in game so i don't understand 

how it could change the scaling from introselect...

Link to comment
https://metin2.dev/topic/34019-introselect-setscale/#findComment-172465
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.