Page 1 of 1

Popups & sound libary

Posted: Fri Dec 21, 2012 11:24 am
by Omega_K2
Hi,

I think those 2 are the next 2 major necessary python libs, once these are done, most of the more useful libs are there. Especially popups would be great to see, because it doesn't really make sense for plugins to have their own implementation (as it causes problems as soon other plugins override the current popup).

Sound would also be rather useful, since the Engine API is rather complex and also different for CS:GO/CSS :P

Anychance popups are next ? (and sounds)

:D

Posted: Fri Dec 21, 2012 11:51 am
by L'In20Cible
Hey Omega_K2,

Popups are currently beeing worked on and should be available soon. For the sounds, I don't see the need of a library because you can directly use IEngineSound or even easier, execute "play" or "playsound" using engine.ClientCommand on the clients of your choice...

L'In20Cible

Posted: Fri Dec 21, 2012 1:38 pm
by La Muerte
That is great news!

will popups be created in a way so clients can not spam "popup opening commands" to crash servers?
or will a good "way" be provided to use popups safely?

Posted: Fri Dec 21, 2012 2:05 pm
by L'In20Cible
Hey La Muerte,

Actually, there's no plan of a "pending system" once the base is not fully working. But if one is implemented, I think that they will simply take the last spot of the tail if the popup was already sent to the given players.

L'In20Cible

Posted: Fri Dec 21, 2012 5:21 pm
by Tuck
L'In20Cible wrote:Hey La Muerte,

Actually, there's no plan of a "pending system" once the base is not fully working. But if one is implemented, I think that they will simply take the last spot of the tail if the popup was already sent to the given players.

L'In20Cible


ehm i created a class to do menus like this in under 75 lines ? what does the api for poups have since it's sounding like it's taking time? :P

Posted: Fri Dec 21, 2012 6:09 pm
by L'In20Cible
Hey Tuck,

We are not all pro as you are! → L'In20Cible bows at Tuck. :)

L'In20Cible

Posted: Fri Dec 21, 2012 7:40 pm
by Tuck
L'In20Cible wrote:Hey Tuck,

We are not all pro as you are! → L'In20Cible bows at Tuck. :)

L'In20Cible


I just made something simple that overwrites current menu for testing the menus quick, i just read your post as in it would take some time to code :)

but im sure the one you guys are making have many more features :)

Posted: Tue Dec 25, 2012 5:36 pm
by satoon101
I guess my question on the sound module is what would you want that module to do? I have nothing against adding one, but I just need to know what all functionality to look to implement.

Satoon

Posted: Wed Dec 26, 2012 9:16 am
by Tuck
satoon101 wrote:I guess my question on the sound module is what would you want that module to do? I have nothing against adding one, but I just need to know what all functionality to look to implement.

Satoon


maybe in the timer that calls the menu back every x could have an appending list so we could append menus to user? without messing with the menu items

Posted: Wed Dec 26, 2012 2:39 pm
by satoon101
Well, I was asking about a "sound" module, not menus, but thanks for the suggestion.

Satoon

Posted: Wed Dec 26, 2012 2:50 pm
by Omega_K2
satoon101 wrote:Well, I was asking about a "sound" module, not menus, but thanks for the suggestion.

Satoon


Taking care of all the related things you need to do, i.e. precaching and stopping sounds easily though the engine (not being much harder then to do then just creating a object). It should also be compatible thoughout orangebox/csgo engine

Syntax: Select all

s = MySound('path/to/file')
s.play()
#later..
s.stop()


But while still keeping some possibilities:

Syntax: Select all

s = MySound('path/to/file',users=(1,2,3), attenuation=0.7, volume=0.5)
s.play()
#later..
s.stop()

Posted: Wed Dec 26, 2012 3:01 pm
by satoon101
Ok, I will look into adding this type of functionality. I am also planning on adding a list object that handles downloadables, at some point.

Satoon

Posted: Sat May 10, 2014 3:30 pm
by Tuck
was this sound functionality ever added ? :)

engines.sound is there but how would i add custom sounds etc and example of playing sounds would be great thanks in advance

Posted: Sat May 10, 2014 3:33 pm
by satoon101
You can handle sounds directly, but there has not been an API build around it as of yet. We still plan on doing this, but just have not gotten to it.

Posted: Mon May 12, 2014 8:42 pm
by Doldol
Is there/will there be a way of streaming audio to a player, without having them download the file in advance? (I'm not talking about an motd with an embedded music player, I'm talking about doing this through the Engine's sound system.)

Also a general popup/menu library would be nice, since plugins that override each other's popups are quite annoying, and pointless to code atm.

Posted: Tue May 13, 2014 4:27 am
by Tuck
Using the path to engine sounds should do it :)

Posted: Tue May 13, 2014 6:26 am
by Omega_K2
Doldol wrote:Is there/will there be a way of streaming audio to a player, without having them download the file in advance? (I'm not talking about an motd with an embedded music player, I'm talking about doing this through the Engine's sound system.)

Also a general popup/menu library would be nice, since plugins that override each other's popups are quite annoying, and pointless to code atm.


I wrote my own popup library, working very well.

https://svn.german-slaughterhouse.de/svn/k2tools/trunk/addons/source-python/packages/custom/k2tools/popup/
https://www.german-slaughterhouse.de/wiki/K2Tools:Popup.manager

I think they changed the API a lot again, so it may need some tweaking though to get it to work with the current dev version, it was working with the last release last time I checked though.

Posted: Wed May 14, 2014 8:14 pm
by Doldol
Omega_K2 wrote:I wrote my own popup library, working very well.

https://svn.german-slaughterhouse.de/svn/k2tools/trunk/addons/source-python/packages/custom/k2tools/popup/
https://www.german-slaughterhouse.de/wiki/K2Tools:Popup.manager

I think they changed the API a lot again, so it may need some tweaking though to get it to work with the current dev version, it was working with the last release last time I checked though.


The problem is that it isn't official, and that when there is an official library yours will have to be switched out for that one.