# Command instrument getting distance from event?

**URL:** https://qa.fmod.com/t/command-instrument-getting-distance-from-event/21203
**Category:** FMOD Studio
**Created:** [February 5, 2024, 1:30pm UTC](https://qa.fmod.com/t/command-instrument-getting-distance-from-event/21203 "2024-02-05T13:30:37Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![trjaudio](https://avatars.discourse-cdn.com/v4/letter/t/ea666f/32.png) [@trjaudio](https://qa.fmod.com/u/trjaudio)
#### Post date: [February 5, 2024, 1:30pm UTC](https://qa.fmod.com/t/command-instrument-getting-distance-from-event/21203/1 "2024-02-05T13:30:37Z")

</div>

I have event A that is far away in a level. In that event, I have a command instrument that triggers event B that is very close. Event B inherits event A’s distance (very far away), but I don’t want that.  
I want event B to have the distance of event B.

Anything I can do to change that?  
Thanks

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [February 7, 2024, 2:28am UTC](https://qa.fmod.com/t/command-instrument-getting-distance-from-event/21203/2 "2024-02-07T02:28:36Z")

</div>

Event instances started by command instruments have their 3D attributes set to match the triggering event, and this position is not updated afterwards. Additionally, you cannot access event instances created this way, so you cannot set their 3D attributes.

If you need event B to have it’s own distance, you’ll have to move event A to the desired position, or re-evaluate the structure of event A with relation to event B. So that I can help suggest an alternative, can I get you elaborate on the event structure and desired behavior in game?

---

<div class="post-metadata">

### Author: ![trjaudio](https://avatars.discourse-cdn.com/v4/letter/t/ea666f/32.png) [@trjaudio](https://qa.fmod.com/u/trjaudio)
#### Post date: [February 13, 2024, 6:36am UTC](https://qa.fmod.com/t/command-instrument-getting-distance-from-event/21203/3 "2024-02-13T06:36:44Z")

</div>

Ok. Seems to be a feature and not a bug then 🙂  
Thanks

---

<div class="post-metadata">

### Author: ![RobMPostal](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@RobMPostal](https://qa.fmod.com/u/RobMPostal)
#### Post date: [September 1, 2024, 10:48pm UTC](https://qa.fmod.com/t/command-instrument-getting-distance-from-event/21203/4 "2024-09-01T22:48:46Z")

</div>

Hi!

After seeing this I was wondering if you would have a suggestion for something like a call and response. For example I have someone saying a speech (location A) and I want the crowd (location B) to answer back to him when he asks a question. Which the crowd has a huge “yes” in a chorus effect in location B. Then ideally can go up to each NPC and then hear them say yes individually. But their yes’s only trigger when the big crowd has been triggered. Thank you!

-Rob

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [September 4, 2024, 5:29am UTC](https://qa.fmod.com/t/command-instrument-getting-distance-from-event/21203/5 "2024-09-04T05:29:45Z")

</div>

It’s a little difficult to make an exact suggestion since I’m not exactly familiar with what you’re trying to implement, so I can only give general advice. That said, given that you want to individually spatialize the “crowd reponse” event instances, you _will_ need to add a spatializer to them and position them in the desired locations in your engine.

To handle _when_ the response events play relative to the “speech” event, the simplest thing to do would be to use a global parameter, and create a parameter sheet in the “response” event using the global parameter so that you can trigger audio based on the parameter value. This could be simple discrete parameter with a binary value for crowd vs no crowd, or it could be a continuous value representing the crowd size, etc.

These “response” event instances can be set to be [Persistent](https://www.fmod.com/docs/2.02/studio/event-macro-controls-reference.html#persistent), and positioned in your engine to match up with NPCs in the crowd. Then, in the “speech” event, a command instrument can be used to set the value of the parameter at specific times during the speech.
