Game Attributes and Scene Changes - can't see the global attribute change?
JackieMac
Member Posts: 14
Hello,
Here's the setup:
- I have 2 scenes
- I have a boolean game attribute called "Battle On"
In scene 1, a collision executes a rule that does:
- Change Attribute game.Battle On to 1
- Change Scene to the second scene, "Battle Scene"
In the Battle Scene, I have an actor that watches the "Battle On" game attribute. If it is on, it initializes stuff for the scene.
This actor doesn't see that the Battle On Boolean is true.
I don't have (or don't think I have) a way to monitor attributes. So, I guess I'm not entirely sure Battle On is still true after the scene change.
I guess I have a few questions related to this. :-)
1) Are game attributes global across scenes?
2) Do actors immediately check for attributes changes after a scene changes?
3) Is there a way I can check the value of attributes in the Lua Console?
Thanks!
Here's the setup:
- I have 2 scenes
- I have a boolean game attribute called "Battle On"
In scene 1, a collision executes a rule that does:
- Change Attribute game.Battle On to 1
- Change Scene to the second scene, "Battle Scene"
In the Battle Scene, I have an actor that watches the "Battle On" game attribute. If it is on, it initializes stuff for the scene.
This actor doesn't see that the Battle On Boolean is true.
I don't have (or don't think I have) a way to monitor attributes. So, I guess I'm not entirely sure Battle On is still true after the scene change.
I guess I have a few questions related to this. :-)
1) Are game attributes global across scenes?
2) Do actors immediately check for attributes changes after a scene changes?
3) Is there a way I can check the value of attributes in the Lua Console?
Thanks!
Comments
I think that it is looking for the event that an attribute changes so on the new scene the event has not occured.
you can have a display text behavior to show the boolean attribute.
I used the Fade In rule in the game I'm working on and it appears to work! My Rule sees the global variable changed by the previous scene. I still don't know why exactly. Perhaps the fade in delays things long enough for my other rules to see the change in the global variable.
Anyway, just wanted to let you know. :-)
Boinkology, I'm curious to hear how you do it in your project. Thanks!