TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

GGClassic Bug - Ambient audio stops playing after player respawns #5465

Open Ghost-l0l opened 6 months ago

Ghost-l0l commented 6 months ago

Hi, Im trying to use the Ambience Zone to put some audio in the background - but It works only until my first death. When I die and respawn it doesn't play anymore.

Other sound scripts will loop even after I die and respawn, for example the 'soundemitter.lua' will still work, doesn't matter how many times I died.

image

Teabone3 commented 1 month ago

Hi @Ghost-l0l , when you say other sound scripts, that do work, are you referencing any that are stock scripts or are those custom scripts?

Ghost-l0l commented 1 month ago

The script I mentioned as example is probably not stock; It's called soundemitter.lua and I think I found it on the forum Here's the full script:

function soundemitter_init(e)
    rolloff = 9 --  0.65 linear rolloff
end

function soundemitter_main(e)

    vol = 501- (GetPlayerDistance(e) / rolloff )

    if vol < 1 then

        vol = 0

    else

        if vol > 499 then
            vol = 500
        end

        SetSound(e,1) 
        SetSoundVolume(vol)
        LoopSound (e,1)

    end

end
Kasseyus commented 3 weeks ago

@Ghost-l0l For problems with custom scripts, you would need to speak to the original author as it's not currently something we can troubleshoot.

Ghost-l0l commented 3 weeks ago

It's not a problem with custom script! The custom script is actually the one that works :D I mentioned it as an example, so potential fixer can have some reference point :)

The script that I had a problem with is the 'ambienceinzone.lua' which is the standard stock script assigned to the ambience zone. Problem is - when I die and respawn, the music stops playing. And I thought it should just play in a loop until I exit the game or turn it off myself with other script; But it just stops playing the moment I die; Or maybe it's not a bug and it was intentionally scripted like this?

Kasseyus commented 2 weeks ago

@Ghost-l0l Ahh, sorry for the misunderstanding. I thought you meant the script from the forums.

I will look into the issue with the "ambienceinzone.lua" and see if I can reproduce it.

Kasseyus commented 2 weeks ago

@Ghost-l0l How big is the zone in your level - would you be able to provide a screenshot of the level editor containing the zone?

Ghost-l0l commented 2 weeks ago

01

It can be recreated with just the stock ambience zone with the stock script and stock music track attached to it.

Kasseyus commented 2 weeks ago

@Ghost-l0l I've identified the issue now, and the fix should be deployed shortly. I'll update this ticket once it is done.