Problems with actors becoming unresponsive after changing scene.
Hi,
When I am in the game I have a "pause" button which changes scene to the pause menu. From here you can quit the game, which changes the scene to the main menu. However, when I get to the main menu scene, all the actors/buttons are unresponsive.
I have no idea whats going on! Again, if anyone can help or suggest some fixes that would be amazing!
Thanks.
When I am in the game I have a "pause" button which changes scene to the pause menu. From here you can quit the game, which changes the scene to the main menu. However, when I get to the main menu scene, all the actors/buttons are unresponsive.
I have no idea whats going on! Again, if anyone can help or suggest some fixes that would be amazing!
Thanks.
Comments
Here's an example of the expected behavior:
Are they switching on or off any attributes when you press play or pause.
I would say show us the behavior and the problem screenshot.
Heres a link to a screenshot of the "Quit to Menu" button from the Pause Scene. I should say that i'm not using the "Pause Game" behaviours to access or leave the Pause Menu scene, just the Change Scene behaviours.
http://i.imgur.com/wJCSG.png
Its really simple behaviour so the problem (I think) probably isn't here.
On the Main Menu scene, the "Start" actor has a pretty long rule that checks what scene the player of the game is up to and then goes to that scene. Theres a link to screen of that as well, though I couldn't get all of it in! Its the same if/else statement checks for around 26 scenes.
http://imgur.com/Bu9fL
Not sure if that could effect the actors becoming unresponsive, but the "Start" button is the only actor on the Main Menu scene that does any checks with Game attributes. The rest just change scenes.
You probably do not need a timer there.
check by making these 2 changes.
You may need to add some log debugging statements or debug actors (i.e. actors with DisplayText behaviors so you can watch the value of certain attributes in real time) to see where the problem is occurring.
@tatiang I have some actors set up monitoring attributes, and they all seem to be doing what they should be doing. Is it possible that the file has become corrupt in some way?
Thanks for all the help guys! I'm going to be away from my computer till tomorrow (its 7:30pm here) so apologies if I don't respond until tomorrow!
I started removing actors one by one as @tatiang suggested, and found the actor which was causing problems. It was my "Start" button actor, and in particular the behaviour which changed the game attribute "Current Scene" to a different value. I use this attribute to keep track of where in the game the player is up to, and as such is pretty crucial.
So I think I need to rebuild that system. At the moment the "Current Scene" attribute is a text attribute which I change to values like "Sc_1" or "Sc_5" depending on where in the game the player is up to. The attribute is changed whenever the player changes scene from one to another.
Do I need to use a different system? Maybe something like an integer that just counts up or down depending on which scene the player is heading to next?
Thanks again for the advice, really helped me pin down the issues!
EDIT: I fixed the problem! For anyone else experiencing this problem, I rebuilt the system using integer values rather than text values. This was probably a rookie error on my part. The system now works perfectly!
Integers are probably your best bet in this case, but another option -- if you needed actual names -- is to unlock an actor in the scene and use the scene.Name attribute to determine what scene you're on.