Index: trunk/src/scriptbuilder/structures/ScriptIncident.java
===================================================================
--- trunk/src/scriptbuilder/structures/ScriptIncident.java	(revision 164)
+++ trunk/src/scriptbuilder/structures/ScriptIncident.java	(revision 167)
@@ -296,23 +296,34 @@
         {
             t = new TimeSlice(start, this);
-            //t.addEvent(ev);
             slices.put(start, t);
         }
-        else
-        {
-            //t.addEvent(ev);
+        
+        //checks if event to add is an I_AudioEvent and if the I_AudioEvent already has an AudioEvent to connect with it
+        if(ev instanceof I_AudioEvent && t.getCorrespondingAudioEvent((I_AudioEvent)ev)==null){
+            
+            AudioEvent audio = (AudioEvent) ScriptEvent.factoryByType(ScriptEventType.AUDIO_EVENT);
+            
+            //checks to see if there is already a filename in the I_AudioEvent, if so, set the AudioEvent ID. This is because the ID is not stored within the Script itself.
+            if(!((I_AudioEvent) ev).getFileName().equals(""))
+            {
+                ((I_AudioEvent) ev).setID(((I_AudioEvent) ev).getFileName());
+            }
+            // checks to see if the I_AudioEvent already has an ID or not, if not, set one based on the audioEventCount. 
+            if(((I_AudioEvent) ev).getID().equals(""))
+            {
+                ((I_AudioEvent) ev).setID(number+Integer.toString(audioEventCount));
+                audioEventCount++;
+            }
+            //sets AudioEvent id to id of I_AudioEvent
+            audio.id = ((I_AudioEvent) ev).getID();
+            //sets I_AudioEvent filename to the AudioEvent id
+            ((I_AudioEvent) ev).setFileName(audio.id);
+            //sets the file path of the AudioEvent based on its internal id
+            audio.setAudioFilePathRelative();
+            //adds AudioEvent to the timeslice
+            t.addEvent(audio);
+            
         }
         t.addEvent(ev);
-        if(ev instanceof I_AudioEvent){
-            //should make a path and a different filename fields for the file itself. Either that or deal with the string separation each time
-            //needs a check for when we move I_AudioEvents in the incident, as to not make duplicate events.
-            String fileName = number+"/"+number + "" + audioEventCount;
-            AudioEvent audio = (AudioEvent) ScriptEvent.factoryByType(ScriptEventType.AUDIO_EVENT);
-            ((I_AudioEvent) ev).setFileName(fileName);
-            audio.setAudioFilePathRelative(fileName);
-            
-            t.addEvent(audio);
-            audioEventCount++;
-        }
         eventCount++;
 
