Page 1 of 1

[HELP ME] i wanna define m_Pos in my Game Mod

Posted: Tue Nov 17, 2015 10:31 am
by hamidkag
hi
i have a problem
in my game mod i wanna Cread Sound for emotions but i have an error in my gamecontex.cpp file
for example:

Code: Select all

						pChr->SetEmoteType(EMOTE_HAPPY);
						CreateSound(m_Pos, SOUND_RIFLE_BOUNCE);
						break;
				case EMOTICON_OOP:
				case EMOTICON_SORRY:
				case EMOTICON_SUSHI:
in Compile say to me undefined m_Pos
please help me how to define it
thanks

Re: [HELP ME] i wanna define m_Pos in my Game Mod

Posted: Tue Nov 17, 2015 2:44 pm
by Blue
I think 6 lines of code are not enough to find the problem.

Re: [HELP ME] i wanna define m_Pos in my Game Mod

Posted: Tue Nov 17, 2015 3:15 pm
by nuborn
m_Pos is defined in CCharacterCore, and since you are writing code in CGameContext, you need to specify which character/core to use. You may want to use this:

CreateSound(pChr->GetCore().m_Pos, SOUND_RIFLE_BOUNCE);