# JS Scripting API: checking if event has a multi-instrument

**URL:** <https://qa.fmod.com/t/js-scripting-api-checking-if-event-has-a-multi-instrument/23506>\
**Category:** FMOD Studio\
**Tags:** studio-scripting-api\
**Created:** [October 23, 2025, 6:12pm UTC](https://qa.fmod.com/t/js-scripting-api-checking-if-event-has-a-multi-instrument/23506 "2025-10-23T18:12:19Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![CaioMJ](https://avatars.discourse-cdn.com/v4/letter/c/58f4c7/32.png) [@CaioMJ](https://qa.fmod.com/u/CaioMJ)\
**Post date:** [October 23, 2025, 10:17pm UTC](https://qa.fmod.com/t/js-scripting-api-checking-if-event-has-a-multi-instrument/23506/3 "2025-10-23T22:17:19Z")

</div>

Ok found a solution in this forum thread: [How can I get sheet content by javascript? - #4 by MisakaCirno](https://qa.fmod.com/t/how-can-i-get-sheet-content-by-javascript/21176/4)

TL;DR: Action sheets are actually multi instruments so instead of `eventSheets[i].modules `it had to be `eventSheets[i].modules.sounds` for action sheets.

Function ended up looking like this:

```auto
function HasVariations( event )
{
	var eventSheets = event.parameters;
	eventSheets.push( event.timeline );
	
	for( var i = 0; i < eventSheets.length; i++ )
	{
		var instruments = [];
		
		if( eventSheets[i].isOfExactType('ActionSheet'))
		{
			instruments = eventSheets[i].modules.sounds;
		}
		else
		{
			instruments = eventSheets[i].modules;
		}
		
		for( var j = 0; j < instruments.length; j++ )
		{
			if (instruments[j].entity == "MultiSound" )
			{
				return true;
			}
		}
	}	
	return false;
}

```

---

_[View the full topic](https://qa.fmod.com/t/js-scripting-api-checking-if-event-has-a-multi-instrument/23506)._
