GoldenEye: Source Forums

  • November 23, 2024, 09:44:26 pm
  • Welcome, Guest
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Scripting API Suggestion: Allow Sound Effects To Be Stopped  (Read 6713 times)

0 Members and 2 Guests are viewing this topic.

Joe

  • Secret Agent
  • **
  • Posts: 139
  • Reputation Power: 54
  • Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.
  • Offline Offline
Scripting API Suggestion: Allow Sound Effects To Be Stopped
« on: April 05, 2013, 07:24:37 pm »

Hi,

DAD mode will have a 5 second resurrection sound effect which will end when a resurrection has finished or when a resurrection fails.

Because I can't stop this sound when a resurrection fails, I will have to divide this sound effect up into separate sound files and then add code to my mode script which will play these sound files in the correct sequence, not playing them all if a resurrection isn't successful.

These are sound effect stopping functions which could be added to GEUtil:

StopSoundBeingPlayedFromPlayer(soundName,player) : Stop a sound played by GEUtil.PlaySoundFromPlayer()
StopSound(soundName) : Stop a sound played by GEUtil.PlaySound()
StopSoundBeingPlayedToTeam(soundName,team) : Stop a sound played by GEUtil.PlaySoundToTeam()

Logged
Free games:FPS + RTS: Renegade X & Battlezone 1.5,RTS: 7 Kingdoms & Open Red Alert, TBS:Hedgewars, playcatan.com & www.wesnoth.org

killermonkey

  • GES Programmer
  • Retired Lead Developer
  • GE:S Fanatic
  • *
  • Posts: 5,473
  • Reputation Power: 346
  • killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!
  • Offline Offline
    • DroidMonkey Apps
Re: Scripting API Suggestion: Allow Sound Effects To Be Stopped
« Reply #1 on: April 05, 2013, 10:31:05 pm »

Agreed good suggestion! I'll modify the playsound functions so they return the sound id or instance so you can then stop it at a later time.
Logged

Joe

  • Secret Agent
  • **
  • Posts: 139
  • Reputation Power: 54
  • Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.
  • Offline Offline
Re: Scripting API Suggestion: Allow Sound Effects To Be Stopped
« Reply #2 on: April 10, 2013, 12:35:10 pm »

Thanks Killer Monkey.
Logged
Free games:FPS + RTS: Renegade X & Battlezone 1.5,RTS: 7 Kingdoms & Open Red Alert, TBS:Hedgewars, playcatan.com & www.wesnoth.org
Pages: [1]   Go Up