Request to allow Custom Addons to change some stuff

Discussion about Custom Addons for GG5

Request to allow Custom Addons to change some stuff

Postby Don » Sat Oct 04, 2008 5:47 am

I'm writing a Custom Addon and I would like to be able to play my winning sound or allow the regular sound depending on some circumstances of the game. It would be best if there were cvars that allowed me to disable any particular sound and substitute my own. I'm not sure of the best way to do this but for now consider it a request for after public release. Don't worry about adding anything like this until after we release as I don't want to sidetrack anyone.

Just something to think about for the future.
I am 31% addicted to Counterstrike. What about you?
Don

Site Admin
Site Admin
User avatar
 
Posts: 529
Joined: Fri Sep 05, 2008 3:05 am
Location: The Valley
Steam Friends Name: Don
Xfire Name: donlafferty

Postby RideGuy » Sat Oct 04, 2008 12:11 pm

For now you could use es.stopsound() to kill the winner sound, then play your own.
RideGuy

Site Admin
Site Admin
User avatar
 
Posts: 201
Joined: Sat Sep 06, 2008 11:30 am

Postby XE_ManUp » Sat Oct 04, 2008 5:09 pm

Yes, I don't care for how I have done the sounds. Although it is nice to have the method we do, I am fairly sure that it needs to be re-worked, although I am not quite sure how I would go about doing so.
XE_ManUp

Site Admin
Site Admin
 
Posts: 662
Joined: Sat Sep 06, 2008 3:36 am

Re:

Postby Don » Sat Oct 04, 2008 5:12 pm

RideGuy wrote:For now you could use es.stopsound() to kill the winner sound, then play your own.

How would I go about that since the winner sound is random, or do I not understand the .ini file having it as @random? I guess I'm not sure how to know which winner sound is being played.
I am 31% addicted to Counterstrike. What about you?
Don

Site Admin
Site Admin
User avatar
 
Posts: 529
Joined: Fri Sep 05, 2008 3:05 am
Location: The Valley
Steam Friends Name: Don
Xfire Name: donlafferty

Re: Request to allow Custom Addons to change some stuff

Postby RideGuy » Sat Oct 04, 2008 6:31 pm

gungamelib.getSound('@random")

I think that will work. That will tell you the song that will be played at gg_win.
RideGuy

Site Admin
Site Admin
User avatar
 
Posts: 201
Joined: Sat Sep 06, 2008 11:30 am

Postby Don » Sat Oct 04, 2008 7:08 pm

Nope.

Traceback (most recent call last):
  File "C:\srcds\cstrike\addons\eventscripts\es.py", line 207, in tick
    x()
  File "C:\srcds\cstrike\addons\eventscripts\_libs\python\gamethread.py", line 174, in tick
    _executenode(first)
  File "C:\srcds\cstrike\addons\eventscripts\_libs\python\gamethread.py", line 156, in _executenode
    function(*a, **kw)
  File "C:\srcds\cstrike\addons\eventscripts\gungame\custom_addons\gg_1v1\gg_1v1.py", line 119, in do_1v1
    win_sound = gungamelib.getSound('@random')
  File "C:\srcds\cstrike\addons\eventscripts\_libs\python\gungamelib.py", line 2163, in getSound
    raise SoundError('Cannot get sound (%s): sound file not found.' % soundName)
SoundError: Cannot get sound (@random): sound file not found.
Don

Site Admin
Site Admin
User avatar
 
Posts: 529
Joined: Fri Sep 05, 2008 3:05 am
Location: The Valley
Steam Friends Name: Don
Xfire Name: donlafferty

Re: Request to allow Custom Addons to change some stuff

Postby RideGuy » Sat Oct 04, 2008 7:48 pm

woops
gungamelib.getSound('winner')
RideGuy

Site Admin
Site Admin
User avatar
 
Posts: 201
Joined: Sat Sep 06, 2008 11:30 am

Postby Saul » Mon Oct 27, 2008 3:42 pm

In 5.1 I might add some sort of hooking system, where you can hook GG's core events (like gg_win), and make it so then it doesn't play a sound, etc.
Saul

GunGame5 Developer
GunGame5 Developer
 
Posts: 147
Joined: Sun Sep 07, 2008 3:29 pm
Xfire Name: saul0



Return to Custom Addons

Who is online

Users browsing this forum: No registered users and 2 guests