Re: 5.4 C++ Play sound

#21
...And I have to change the order of the parameters (name, occlusionType, transformation, SetCurrentEnvironments, control_id).
Right, my bad, in 5.4 the order of those parameters is as you described, we adjusted that for 5.5 so look out for that change if you upgrade your project to 5.5 once released. ;)
Also, I adjusted my last example to not use the control name for the audio object name as that might be confusing and isn't how it's meant to be used.

Re: 5.4 C++ Play sound

#22
As I understand, GetOrCreateComponent works, if you register your component for editor like this (and not only with CryTek's standard components):

Code: Select all

static void RegisterYourComponent(Schematyc::IEnvRegistrar& registrar)
{
Schematyc::CEnvRegistrationScope scope = registrar.Scope(IEntity::GetEntityScopeGUID());
{
Schematyc::CEnvRegistrationScope componentScope = scope.Register(SCHEMATYC_MAKE_ENV_COMPONENT(YourComponent));
// Functions
{
}
}
}

CRY_STATIC_AUTO_REGISTER_FUNCTION(&RegisterYourComponent);
Without doing this, you can attach your component only via GetOrCreateComponentClass.
Correct. Totally forgot about that fact :)
Cryengine tutorial videos on my Youtube channel! Check it out !
https://www.youtube.com/user/MusicForLifePL20

Who is online

Users browsing this forum: No registered users and 0 guests