Stopping sound [UNRESOLVABLE]

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: Stopping sound [UNRESOLVABLE]

Post by AndakRainor »

Sometimes modding this game makes me crazy !!!

So I have the same problem with sounds stopping when the champions are all disabled. I needed to disable them because I didn't find any way to draw a custom UI on the screen without mouse clicks grabbing items from the hidden champions hands.

Why... WHY did you do that ? Please give back the sounds !!! Or allow me to get a graphic context directly to draw on the screen without getting it from the party onDrawGUI !!! Or a way to disable mouse over tooltips drawn AFTER the onDrawGUI event, and mouse grabbing items !

And naturally, playSound is totally useless to control any loop sound !
In my despair I even tried ambient track, because yeaaah that sound still plays with disbled champions, for a reason ! The comical conclusion being the OGG conversion playing too fast ONLY in grimrock !
Will this nightmare ever end ??? :evil:
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Stopping sound [UNRESOLVABLE]

Post by minmay »

AndakRainor wrote:So I have the same problem with sounds stopping when the champions are all disabled. I needed to disable them because I didn't find any way to draw a custom UI on the screen without mouse clicks grabbing items from the hidden champions hands.
Why not just return false from PartyComponent.onClickItemSlot()?
AndakRainor wrote:And naturally, playSound is totally useless to control any loop sound !
Just use a SoundComponent, it has a 2d mode (use SoundComponent:setSoundType("ambient") or soundType = "ambient" in the definition)
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: Stopping sound [UNRESOLVABLE]

Post by AndakRainor »

Thanks ! I will try that tomorrow, I had enough for today :lol:
Also, is there a good way to keep all character's sheets / inventory closed, and disable other mouse controls like swaping hands sets ? All that and also tooltips over my UI are very disturbing.
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: Stopping sound [UNRESOLVABLE]

Post by AndakRainor »

So I tried PartyComponent.onClickItemSlot() without disabling champions. It works for item grab, but items are still usable with right click. Another problem is I can swap champions and hand sets. Also SoundComponent:setSoundType("ambient") does not prevent sounds from stopping if I disable champions.
Post Reply