# Using "inverted" from the scripting API

**URL:** https://qa.fmod.com/t/using-inverted-from-the-scripting-api/24150
**Category:** FMOD Engine
**Created:** [April 1, 2026, 11:10am UTC](https://qa.fmod.com/t/using-inverted-from-the-scripting-api/24150 "2026-04-01T11:10:24Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jaimesh](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@jaimesh](https://qa.fmod.com/u/jaimesh)
#### Post date: [April 1, 2026, 11:10am UTC](https://qa.fmod.com/t/using-inverted-from-the-scripting-api/24150/1 "2026-04-01T11:10:24Z")

</div>

Hello everyone,

I’m trying to implement a Java script that creates a nested event that must be played only when a labelled parameter P “is NOT equal” to a specific value V. The code is like this:

var second = secondTrack.addSound(evt.timeline, “EventSound”, startTime, 1.0);  
second.addParameterCondition(studio.project.lookup(“parameter:/P”), … )

But I don’t know how to set the condition to “is NOT equal” to a given value V, i.e., to set the corresponding “Inverted” flag appearing in the event editor. As an alternative way I also tried to write the condition as “P equals to all the rest” of possible values, but I neither can use the “OR” operator from the script.

Is there any possible way to do this?

Thank you in advance!!

---

<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: [April 7, 2026, 5:05am UTC](https://qa.fmod.com/t/using-inverted-from-the-scripting-api/24150/2 "2026-04-07T05:05:20Z")

</div>

Hi,

Thank you for sharing the code!

> [@jaimesh](#):
>
> But I don’t know how to set the condition to “is NOT equal” to a given value V, i.e., to set the corresponding “Inverted” flag appearing in the event editor. As an alternative way I also tried to write the condition as “P equals to all the rest” of possible values, but I neither can use the “OR” operator from the script.
> 
> Is there any possible way to do this?

Yes, this is possible. The object returned by `addParameterCondition()` exposes an `isInverted` property, which corresponds to the “Inverted” flag appearing in the event editor.

For example:

```auto
var condition = second.addParameterCondition(studio.project.lookup(“parameter:/P”), … )

condition.isInverted = true

```

Hope this helps! Let me know if it works.

---

<div class="post-metadata">

### Author: ![jaimesh](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@jaimesh](https://qa.fmod.com/u/jaimesh)
#### Post date: [April 9, 2026, 5:28pm UTC](https://qa.fmod.com/t/using-inverted-from-the-scripting-api/24150/3 "2026-04-09T17:28:42Z")

</div>

It works!! Thank you so much.

Is this documented somewhere?

---

<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: [April 10, 2026, 12:31am UTC](https://qa.fmod.com/t/using-inverted-from-the-scripting-api/24150/4 "2026-04-10T00:31:50Z")

</div>

Glad to hear that works!

> [@jaimesh](#):
>
> Is this documented somewhere?

At the moment, this isn’t explicitly documented in the scripting API reference.

While [addParameterCondition()](https://www.fmod.com/docs/2.03/studio/scripting-api-reference-project-model-triggerable.html#triggerableaddparametercondition) is documented, properties like `isInverted` aren’t currently listed in detail, so the best way to discover them is by inspecting the returned object in the console using `dump()`.

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

---

<div class="post-metadata">

### Author: ![jaimesh](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@jaimesh](https://qa.fmod.com/u/jaimesh)
#### Post date: [April 20, 2026, 6:27am UTC](https://qa.fmod.com/t/using-inverted-from-the-scripting-api/24150/5 "2026-04-20T06:27:32Z")

</div>

This also helps me. Thank you!
