I got issues with a toggle


Rommels
07-10-2006, 03:29 PM
Ok what I am doing is making a button that turns a generator with lights (like the on in the allied spawn on jagd) on and off.

I've got it to toggle the light_spots, and point_spotlights on and off, thats the easy part. I am having problems making it play the engine start sound when it is turned on and play the engine stop sound when turned off.

I'm using the v8 start, loop, and stop sounds from source sounds.gcf

My problem is if I put a output for the sound and set it to toggle it plays when I toggle the lights on and it plays when I turn them off also.

So I guess my question is, How do I make it play the start sound when pressed the first time, then play the loop, then when pressed again to turn it off stop the loop and play the stop sound?

I have been searching all over the net to try and figure this out and have also tried about 20 different things but I still can't figure it out.

-Rommel
--The new n00b mapper

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.