# Scripting: Check for automation on master track?

**URL:** <https://qa.fmod.com/t/scripting-check-for-automation-on-master-track/22733>\
**Category:** FMOD Studio\
**Tags:** studio-scripting-api\
**Created:** [March 26, 2025, 10:39am UTC](https://qa.fmod.com/t/scripting-check-for-automation-on-master-track/22733 "2025-03-26T10:39:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![deHaan](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/dehaan/32/68_2.png) [@deHaan](https://qa.fmod.com/u/deHaan)\
**Post date:** [March 26, 2025, 10:39am UTC](https://qa.fmod.com/t/scripting-check-for-automation-on-master-track/22733/1 "2025-03-26T10:39:26Z")

</div>

Very specific question to the project I am working on:  
With FMOD scripting, is it possible to figure out if a parameter is used for automation on any events on the master track of an event?

I basically need to check if our “Occlusion” parameter is used on the master track of events in our project

Thank you!

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [March 27, 2025, 5:28am UTC](https://qa.fmod.com/t/scripting-check-for-automation-on-master-track/22733/2 "2025-03-27T05:28:50Z")

</div>

Hi,

> [@deHaan](#):
>
> With FMOD scripting, is it possible to figure out if a parameter is used for automation on any events on the master track of an event?

Yes, It is possible. You could try something like:

```auto
event[0].masterTrack.automationTracks[0].automator.automationCurves[0].parameter.presetOwner.dump()

```

This will give you information about the parameter, including its name.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/c/cffda4a3503fea679580795a7deefb888aa91e83.png)

Calling `.dump()` on variables in the scripting console is a great way to inspect their properties and check what is available.

For your specific case, you could loop through the relevant arrays and check if any event’s master track uses a parameter whose name matches “Occlusion”.

Hope this helps, please don’t hesitate to ask if you have questions.

---

<div class="post-metadata">

**Author:** ![deHaan](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/dehaan/32/68_2.png) [@deHaan](https://qa.fmod.com/u/deHaan)\
**Post date:** [March 27, 2025, 9:05am UTC](https://qa.fmod.com/t/scripting-check-for-automation-on-master-track/22733/3 "2025-03-27T09:05:58Z")

</div>

Thank you! I am struggling a bit making this work. Will this only work if “Show Automation in Editor” is enabled for the parameter (which it is not for our events)?

---

<div class="post-metadata">

**Author:** ![deHaan](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/dehaan/32/68_2.png) [@deHaan](https://qa.fmod.com/u/deHaan)\
**Post date:** [March 27, 2025, 11:06am UTC](https://qa.fmod.com/t/scripting-check-for-automation-on-master-track/22733/4 "2025-03-27T11:06:21Z")

</div>

Was able to find it like this, which might be a horrible way to do it, but seems to work at least. Wasn’t able to look at effects inside effect chains though, so made [a separate post about that](https://qa.fmod.com/t/scripting-loop-through-content-of-effect-chain/22737).

```auto
        function checkEffectForOcclusionParameter(effect) {
            if (effect.automators && effect.automators.length > 0) {
                for (var i = 0; i < effect.automators.length; i++) {
                    var automator = effect.automators[i];
                    if (automator.automationCurves && automator.automationCurves.length > 0) {
                        for (var j = 0; j < automator.automationCurves.length; j++) {
                            var curve = automator.automationCurves[j];
                            if (curve.parameter && curve.parameter.presetOwner && curve.parameter.presetOwner.name === "Occlusion") {
                                return true;
                            }
                        }
                    }
                }
            }
            return false;
        }

```

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [March 28, 2025, 12:49am UTC](https://qa.fmod.com/t/scripting-check-for-automation-on-master-track/22733/5 "2025-03-28T00:49:34Z")

</div>

Thank you for sharing the solution.

I am glad to hear you got it working!

Your function is totally valid for what you’re trying to do, and it’s actually not horrible at all!
