Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [SSGM 4.1 Plugin] AI Dialogue
Re: [SSGM 4.1 Plugin] AI Dialogue [message #491256 is a reply to message #487406] Wed, 07 October 2015 16:11 Go to previous message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma:
General (3 Stars)

I am going to add some things to the next scripts build that should help you out regarding the sounds and stuff.

ConversationRemarkClass remark;
Conversation->Get_Remark_Info(0,remark);
TDBObjClass *translate_obj = TranslateDBClass::Find_Object(remark.Get_Text_ID());
if (translate_obj != NULL)
{
	int sound_def_id = (int)translate_obj->Get_Sound_ID ();
	Vector3 pos = Commands->Get_Position(obj);
	Commands->Create_Sound(Get_Definition_Name(sound_def_id),pos,obj);
}


Use this code (which assumes obj is the soldier you are playing the sound on and Conversation is the ConversationClass instance) along with the attached ConversationClass.h and DialogueClass.h files (both files will be in the next 4.2 update but will work no problems with the current build of 4.2) and that should let you get the correct sound filename that you need regardless of how its set in the conversation data.

You will also need to call DialogueClass::Get_Option_List and DialogueClass::Get_Silence_Weight instead of accessing the variables directly.

Note that it plays the sound at the origin of the soldier, not the head bone (this IS correct to what the actual dialogue code in Renegade does)


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies

[Updated on: Wed, 07 October 2015 16:12]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: LevelRedit, a .mix to .lvl converter!
Next Topic: Tiberium Crystal War 2 Test Client
Goto Forum:
  


Current Time: Sun Nov 24 08:55:34 MST 2024

Total time taken to generate the page: 0.00950 seconds