HI
I’m doing a javascript script and in general terms I have been able to do almost anything with code.
I just want to know how I can set the Transition Condition logic as AND or OR, thanks in advance!
Part of my code:
var markerTrack = event.markerTracks[3]; // This is a Transition Region
var region = markerTrack.addTransitionRegion(marker1.position, marker2.position - marker1.position, marker3);
var parameterPreset = studio.project.lookup("parameter:/HasChorus");
var condition = region.addParameterCondition(parameterPreset, 1, 1);
The member in the API you’re looking for is triggerConditionMode
, and belongs to whatever object has the setting in UI - in this case, it’s the transition marker/region, soregion.triggerConditionMode
. 0 equals AND, and 1 equals OR.
1 Like
Thanks it worked! For everybody is reading this topic I just want to point out that region.triggerConditionMode = 0
is the correct way to do this.
Also, where can I find documentation about this kind of members/methods/functions ? I searched a lot in internet and in your API documentation https://www.fmod.com/docs/2.00/unity/user-guide.html (in all versions 2.00, 2.01, 2.02. 2.03) but triggerConditionMode
is not described anywhere in your webpage docs.
Unfortunately, the scripting API reference is quite barebones at the moment. For things that aren’t covered in the reference docs, our recommendation is to make use of the .document()
and .dump()
functions on ManagedObject
. .document()
will log all members and functions of a given ManagedObject
to console, and .dump()
will log the same as well as the current values of those members.
1 Like
I understand, again thanks for the solution and for the sugestions about how to find all the possibilities that FMOD provides
.
1 Like