Jump to content
The simFlight Network Forums

Sim Dave

new Members
  • Posts

    3
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Earth

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Sim Dave's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Yes Thomas. The problem is when you toggle the switch the sound starts and .lua finishes, when you toggle the switch off the .lua triggers but it has lost all reference to the sound so can't stop it or starts another instance. Well that is what I think is happening by integrating the sound.query log entry. I did wonder if I tied the sound start in a loop and then stop the sound and killed the loop with the toggle off might work, but have not gone back to it as it annoyed the hell out of me ;)
  2. I have spent hours on something I thought would be a 5-minute job! having looked again at the log files I have spotted that the sound.query creates an entry 'LUA: Global: Pumpsound = 1' next time the .lua has trigged this increments to 2 and so on. effectively the sound.stop is never going to work the way I'm trying.
  3. I'm trying to get my head around triggering sounds in FSX & FSUIPC v4.959 with the following .lua script function playme (path) if(sound.query(path)) then -- do nothing else PumpSound = sound.play(path) end end -- external toggle switch if ipcPARAM == 1 then -- Toggle ON playme("ElectricPump.wav") end if ipcPARAM == 0 then -- Toggle OFF sound.stop("ElectricPump.wav") end The sound plays ok, but I cant stop it, nor can I stop it from starting multiple times. what I am missing? I started with sound.play(ElectricPump.wav) sound.stop(ElectricPump.wav) it plays, but can't be stopped! the .wav file is about 7 seconds long
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.