No method for Load sound-Audio Controls Editor in C# code

#1
I use CryEngine 5.4.0 Build 164 Final


Problem :
I searched a lot for find mehtod or methods for load sound but all output methods is uint !!! ( Engine.AudioSystem )
I want play sound according to this property bottom :

public string _sound1;
[EntityProperty(EntityPropertyType.Sound)]
public string Sound1
{
set {

_sound1 = value;
}

get{

return _sound1;
}

}


Where is the method for play sound?
C++ Programmer
https://www.youtube.com/AhmadKarami

Re: No method for Load sound-Audio Controls Editor in C# code

#2
Hey Ahmad,

First you will want to setup your Audio Triggers using ACE (Tools->Audio Controls Editor), in the Sandbox Editor. (I assume you are using SDL Mixer for now).
Then you can execute these triggers in C# with something like:

Code: Select all

AudioTriggerId MyTriggerId = Audio.GetTriggerId("My_Trigger_Name");
Audio.Play(MyTriggerId);
Uniflare
CRYENGINE Community Coordinator
Here to help the community and social channels grow and thrive.

My personal belongings;
Beginner Guides | My GitHub | Splash Plugin

Re: No method for Load sound-Audio Controls Editor in C# code

#3
Hey Ahmad,

First you will want to setup your Audio Triggers using ACE (Tools->Audio Controls Editor), in the Sandbox Editor. (I assume you are using SDL Mixer for now).
Then you can execute these triggers in C# with something like:

Code: Select all

AudioTriggerId MyTriggerId = Audio.GetTriggerId("My_Trigger_Name");
Audio.Play(MyTriggerId);
if it is possible , please tell me , how to implement this instruction in c++?

thank you so much :-)
C++ Programmer
https://www.youtube.com/AhmadKarami

Re: No method for Load sound-Audio Controls Editor in C# code

#4
Hey Ahmad,

First you will want to setup your Audio Triggers using ACE (Tools->Audio Controls Editor), in the Sandbox Editor. (I assume you are using SDL Mixer for now).
Then you can execute these triggers in C# with something like:

Code: Select all

AudioTriggerId MyTriggerId = Audio.GetTriggerId("My_Trigger_Name");
Audio.Play(MyTriggerId);

I'm one year old when I want to write with C++, but I really have a lot of questions and I'm going very slowly :-( I made great tutorials for Schematyc, Flowgraph, and C # for people.
But I want to make my game via C++.
C++ Programmer
https://www.youtube.com/AhmadKarami

Re: No method for Load sound-Audio Controls Editor in C# code

#5
The equivalent in C++ would be:

Code: Select all

CryAudio::ControlId const MyTriggerId = CryAudio::StringToId("My_Trigger_Name");
gEnv->pAudioSystem->ExecuteTrigger(MyTriggerId);
Although you may need to handle loading and unloading of the trigger manually, depending where and how you use this.
Uniflare
CRYENGINE Community Coordinator
Here to help the community and social channels grow and thrive.

My personal belongings;
Beginner Guides | My GitHub | Splash Plugin

Re: No method for Load sound-Audio Controls Editor in C# code

#6
The equivalent in C++ would be:

Code: Select all

CryAudio::ControlId const MyTriggerId = CryAudio::StringToId("My_Trigger_Name");
gEnv->pAudioSystem->ExecuteTrigger(MyTriggerId);
Although you may need to handle loading and unloading of the trigger manually, depending where and how you use this.
When I left-click First Person Project C++ template , I hear a sound bullet , I checked C++ codes , but I found nothing :-) where I can delete this sound inside C++ ? I know this sound is inside Audio Controls Editor , please help me , thank you ;-)
C++ Programmer
https://www.youtube.com/AhmadKarami

Who is online

Users browsing this forum: No registered users and 1 guest