Hi Amen
I've been trying the global sound tracking discussed above. and I've run into a problem.
I've integrated your code into my script but when I test it I get an error code (see below)
Here's the code integrated into my script.
********************************************************
g_SoundPlaying1 = g_SoundPlaying1 or {} --at the top of the script
--**** This plays or loops and sets volume ***
if SndLoop == 1 then PlaySound(e,ObjPoint[13])
end
if SndLoop == 2 then LoopSound(e,ObjPoint[13])
end
SetSoundVolume(ObjPoint[14])
--************************************************
--****************** This checks the global and stops playing if needed ******************
if g_SoundPlaying1.id then StopSound (g_SoundPlaying1.id, g_SoundPlaying1.slot) end
-- NOTE this is the line that's getting the error
g_SoundPlaying1 {id = e, slot = ObjPoint[13]} -- sets id and slot for new sound
Error code: " attempt to call global g_SoundPlaying1 [a table value]"
I'm not sure what's happening ??? the code seems correct. Do I need to set
the id and slot variables into the table???
"THERE IS NO SPOON"
AMD 6300 6 core 3.5 ghz, Windows 10, 8GB ram, GTX 1060 2GB ram