# Game Maker Studio: possible to detect that an event has played from a track? (Command Instrument, nested event...)

**URL:** <https://qa.fmod.com/t/game-maker-studio-possible-to-detect-that-an-event-has-played-from-a-track-command-instrument-nested-event/24153>\
**Category:** FMOD Studio\
**Created:** [April 3, 2026, 2:18pm UTC](https://qa.fmod.com/t/game-maker-studio-possible-to-detect-that-an-event-has-played-from-a-track-command-instrument-nested-event/24153 "2026-04-03T14:18:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ninomojo1](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/ninomojo1/32/8510_2.png) [@ninomojo1](https://qa.fmod.com/u/ninomojo1)\
**Post date:** [April 3, 2026, 2:18pm UTC](https://qa.fmod.com/t/game-maker-studio-possible-to-detect-that-an-event-has-played-from-a-track-command-instrument-nested-event/24153/1 "2026-04-03T14:18:05Z")

</div>

Hi there,

Game Maker project. I’m trying to place events along side a music track, and have the game react to them (to have specific eye candy happen on certain beats, etc.). So far, using **[Studio::EventDescription::getInstanceCount](https://www.fmod.com/docs/2.03/api/studio-api-eventdescription.html#studio_eventdescription_getinstancecount),** we’ve tried detecting that an event was played from within a music event (either by a Command Instrument, or a nested event). Both failed. Is there a proper way to do this?

However by using “Set Parameter” in a Command Instrument, we got GameMaker to successfully detect that a parameter had changed value, so there’s that, but it feels that there might be a better way.

Any help greatly appreciated, thanks!

---

<div class="post-metadata">

**Author:** ![ninomojo1](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/ninomojo1/32/8510_2.png) [@ninomojo1](https://qa.fmod.com/u/ninomojo1)\
**Post date:** [April 7, 2026, 2:15pm UTC](https://qa.fmod.com/t/game-maker-studio-possible-to-detect-that-an-event-has-played-from-a-track-command-instrument-nested-event/24153/2 "2026-04-07T14:15:14Z")

</div>

Bump, because Easter weekend. 🙂

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [April 12, 2026, 10:11pm UTC](https://qa.fmod.com/t/game-maker-studio-possible-to-detect-that-an-event-has-played-from-a-track-command-instrument-nested-event/24153/3 "2026-04-12T22:11:30Z")

</div>

Hi,

Apologies for the delayed response.

An option could be using the `FMOD_STUDIO_EVENT_CALLBACK_START_EVENT_COMMAND` with the [FMOD Engine | Studio Api Eventinstance - Studio::Eventinstance::Setcallback](https://fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setcallback). This will return the event instance triggered by the `Start Event` command instrument.

An example of how to use callbacks in `C#` can be found here: [Unity Integration | Examples Timeline Callbacks](https://fmod.com/docs/2.03/unity/examples-timeline-callbacks.html)

Hope this helps!
