L
LV154
Guest
Dear all,
My project is a top down shooter that involves loading and unloading external sounds whilst driving a car. Sometimes, but not always, the game freezes and crashes without a fatal error when I exit a vehicle. Usually, the looping song stops, but I would occasionally notice that the sound carries on playing after I exit a vehicle, then a fraction of a second later the entire game freezes and crashes with no message.
When the player exits a vehicle, an alarm is initiated to the car parent object which involves the following:
.....code to create the player if place is free etc.....
if sound_exists(radio){
sound_stop(radio){
sound_delete(radio){radio=0}}}
I've put in sound_stop before sound delete thinking this would solve the problem but it still persists.
I'm not sure whether this is an issue with memory, as the last time this has happened the memory wasn't exactly full. Perhaps I'm missing something out here, or looking in the wrong place altogether? Am I asking the computer to do way too many things too quickly?
I really appreciate any input, perhaps some of you know more about game processes more than I do.
Thanks
My project is a top down shooter that involves loading and unloading external sounds whilst driving a car. Sometimes, but not always, the game freezes and crashes without a fatal error when I exit a vehicle. Usually, the looping song stops, but I would occasionally notice that the sound carries on playing after I exit a vehicle, then a fraction of a second later the entire game freezes and crashes with no message.
When the player exits a vehicle, an alarm is initiated to the car parent object which involves the following:
.....code to create the player if place is free etc.....
if sound_exists(radio){
sound_stop(radio){
sound_delete(radio){radio=0}}}
I've put in sound_stop before sound delete thinking this would solve the problem but it still persists.
I'm not sure whether this is an issue with memory, as the last time this has happened the memory wasn't exactly full. Perhaps I'm missing something out here, or looking in the wrong place altogether? Am I asking the computer to do way too many things too quickly?
I really appreciate any input, perhaps some of you know more about game processes more than I do.
Thanks