Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Feature requests and bug reports
Having Problems with "Switch Scene"

Registered User
2022-01-26 19:08:26


When I switch scenes it often doesn't carry out the "Before First Draw (and also on reload) functions - it tends to just hang.

I've always had this problem and usually found a workaround but this time, I can't get it to work.

Any ideas please?

Here's how it looks.....
Before First Draw (and on reload)
Stop a sound "music.ogg"
Set variable "Win" +1
Set variable "Replayed" =1
Restart scene "Start"
Do Something later (1500ms) Play a sound "win.ogg"
Do something later (3000ms) Switch to scene "Start"
Sometimes it will work perfectly, other times it just freezes and wont switch scene. I thought the restarting the scene before switching would work but it doesn't help.


2022-01-26 19:30:36

After around an hour of unsuccessful trying, I managed to fix it within minutes of posting here.

I was restarting the next scene - but I also needed to restart the current scene. Works perfectly now.

2022-02-07 15:23:45

On switching scene "stop sound" and "stop all sounds" isn't working with "Before First Draw".

2022-02-07 15:30:02

Well, why are you doing this on the first draw, you can always "stop all sounds" right before switching to a new scene so that they won't play in the next scene. You need to stop all the sound in the current scene, Its always a good practice to stop all the sounds before the switch scene action

2022-02-07 15:59:04

I disagree that it's good practice to set everything before the previous scene closes - that means I'd have to either cut everything short or add a delay before switching scenes - - much simpler to set the flags when the scene start - I assumed that was the whole point of having a "before first draw" event.

As per all my other bug reports, there are so many things don't seem to work when the scene starts. It's not just the "Stop sounds" - there are many bugs I flagged due to "on first draw" either failing to trigger or it triggers repeatedly.

Of course, I can stop the sounds before starting the scene, as I can workaround all the other bugs by adding intricate variable paths to strictly control the events - I think I'll probably just stop posting any more bugs that I find - no one else seems to be affected by them.


2022-02-07 16:18:29

I am not saying for everything, I was talking about just the sounds. as it does make sense, the sounds are playing from a previous scene so technically when you do stop all the sounds in the new scene then that command will only try to stop the sounds from that particular scene only and not from the previous scene, that's why it will never stop the sound even if the "stop all sounds" command used in the new scene.

so when you said that it gets fixed when you restarted the current scene, assuming that you restarted the current scene right before switching to the new scene. It technically stopped all the sound effects, and before any of them gets played the scene switches to the next scene, which prevents them from playing in the new scene.

but if you have frame drops or something like that in your first scene right before the switch scene action takes place then it will surely be going to play the sound in the new scene as well, and then you might reconsider what I said in my previous comment.

and no please don't stop posting the bugs you encounter, posting bugs will only improve the engine, people do get affected by those bugs at some point or another, but the playing sounds even after the scene has been switched is a known bug, and as long as there are workarounds for the known bugs, people don't bother demanding fixes for them.

To be honest, I am also one of those guys, but I think that one should report bugs to the developer even if there are workarounds for them.

I myself know so many bugs in the engine, that I think many people had never ever encountered. The reason I don't report them is I am CopperCube Lover, and I think reporting that many bugs will result in defame of CC. It's already not that popular and knowing that there are that many bugs in the engine people will ignore it, despite its capabilities and what miracles it can do. So, I don't post those bugs, but I always try to share workarounds.

Hope I made it clear why it's a good practice to stop the sounds of the current scene before switching to the next scene until we get this bug fixed.

2022-02-07 16:36:48

OK, cool. Thanks for explaining. Yes, makes sense. I donlt want to come across as negative. I do really love coppercube and the community here.

I have managed to get most of the game working now, the sounds were the last thing to fix and now just a few little bugs I need to chase.

With regards the "on first draw" thing, it could also be related to "Fade Screen" plugin when used in conjunction with other actions. I use the fade screen plugin for every scene so, as you say, it could probably introduce dropped frames. .

Thank you.

2022-02-07 18:46:14

Best of luck for the game, as you are saying its only the sound that is left, I am assuming that the release date of your game is not far away. All the very best for your project.

2022-02-07 21:15:06

Thanks! Yes, I'll hopefully release it very soon - it's the Nekron game, not the Cas-Evac game.

The map is working, the card scene is working, the fight scene is working, the GUI is working, all animations are done, some of the card power-ups are working, just a few finishing touches before I have a working beta.

Create reply:

Posted by: (you are not logged in)

Enter the missing letter in: "Internatio?al" (you are not logged in)




Possible Codes

Feature Code
Link [url] [/url]
Bold [b]bold text[/b]
Image [img][/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]



Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact