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

Request help for teeworlds-related subjects (mapping, servers, ..).
For client issues, see our repositories (https://github.com/ddnet/ddnet/issues).
Post Reply
User avatar
hamidkag
Posts: 4
Joined: Wed Jun 25, 2014 10:59 am

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

Post 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
Blue
Posts: 58
Joined: Sat May 30, 2015 5:50 pm
Mapper profile: http://ddnet.tw/mappers/Blue/

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

Post by Blue »

I think 6 lines of code are not enough to find the problem.
I m Blue da ba dee da ba die
nuborn
Posts: 5
Joined: Fri May 08, 2015 1:01 pm

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

Post 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);
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest