AlessioForlanteDev
Member
Hey guys, here's the deal.
I am making an open world game with cars. They make sounds via an emitter. The sound loops and changes in pitch based on how fast the car is going.
If a player drives the car, then the priority is 100, otherwise, it is 20. The only sounds that are in the game are these emitters and crash sounds. The emitters are only created once a car is interacted with (let's say, once we touch it with our own car).
The issue is, if I crash a few cars at the same time, then my own car, the one with the highest priority stops. If I leave the area, make the sound stop by getting out of the car and re-entering it starts again. even the crash sounds, which are not made with emitters make it stop.
I have set audio_channel_num to 256 but It doesn't seem to make any difference
This is the code. (or the part thats relevant
if seat1 <3 var priority = 100 else var priority = 20
if engine_soundplaying = 0 {engine_soundplaying = audio_play_sound_on(engine_emitter,engine_sound,true,priority) audio_emitter_gain(engine_emitter,1) }
// moving emitter
audio_update_emitter_at_listener(engine_emitter,x,y)
// car pitch
{audio_emitter_pitch(engine_emitter, 0.5+gearpitch/20)}
Am I doing something wrong, or do I just need to toy around with priorities more and use fewer sounds? Because I am not using that many at all.
I am making an open world game with cars. They make sounds via an emitter. The sound loops and changes in pitch based on how fast the car is going.
If a player drives the car, then the priority is 100, otherwise, it is 20. The only sounds that are in the game are these emitters and crash sounds. The emitters are only created once a car is interacted with (let's say, once we touch it with our own car).
The issue is, if I crash a few cars at the same time, then my own car, the one with the highest priority stops. If I leave the area, make the sound stop by getting out of the car and re-entering it starts again. even the crash sounds, which are not made with emitters make it stop.
I have set audio_channel_num to 256 but It doesn't seem to make any difference
This is the code. (or the part thats relevant
if seat1 <3 var priority = 100 else var priority = 20
if engine_soundplaying = 0 {engine_soundplaying = audio_play_sound_on(engine_emitter,engine_sound,true,priority) audio_emitter_gain(engine_emitter,1) }
// moving emitter
audio_update_emitter_at_listener(engine_emitter,x,y)
// car pitch
{audio_emitter_pitch(engine_emitter, 0.5+gearpitch/20)}
Am I doing something wrong, or do I just need to toy around with priorities more and use fewer sounds? Because I am not using that many at all.