# Using Fmod to script events in Java?

**URL:** https://qa.fmod.com/t/using-fmod-to-script-events-in-java/11355
**Category:** Unity
**Created:** [March 24, 2014, 3:25pm UTC](https://qa.fmod.com/t/using-fmod-to-script-events-in-java/11355 "2014-03-24T15:25:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Aeolian](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@Aeolian](https://qa.fmod.com/u/Aeolian)
#### Post date: [March 24, 2014, 3:25pm UTC](https://qa.fmod.com/t/using-fmod-to-script-events-in-java/11355/1 "2014-03-24T15:25:03Z")

</div>

Hi,

I’m new to the coding/scripting side of Fmod and Unity having only used the designer portion of the middleware before.

So I appologise if my questions are a bit naive.

To help me learn coding and using scripting for FMod in Unity I have created a Pong style game using java script.  
I have imported my build folder into the Unity project from FMod Studio attached a listener to the camera and added a Background music in 2d from the provided emitter script, all working fine.

What I am struggling to do is add the ball sound to the existing java code, I know where in the code I want to add it just after Function OnCollisionEnter2D but I don’t know how to call the needed FMod events in Java. I have tried a number of things using the C# examples etc I have found online but I just cant seem to make it happen.

If anyone out there could be generous enough to help me out here, I would be very grateful.

Thanks
