Pause game using an attribute?
aurynstar
Member Posts: 41
Hi all!
I'm trying to get a Level Complete screen to show when an attribute becomes a certain value.
rule:
when game.attribute <= 0
pause game (go to scene: level complete)
I can't get this to work at all. Am I missing something ridiculously simple and this is totally possible?
Comments
Hard to tell without seeing how you've set things up. The way you've described your rule sounds good, but are you actually certain the game.attribute is actually reaching a value of <=0? Use the Display Text Behavior to show the state of variables during testing.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Hi Braydon_SFX
Yeah, I have tried a bit of debugging and I can see that attribute reach 0 and then I used the same rule to spawn an actor and that works!
I just can't get it to pause the game or change scenes for that matter.
Ok. So, originally, this rule was in my game controller actor which sits off screen in the gray bit.
I decided to transfer this rule to a "debug" actor also off screen. It works! The game pauses.
There is nothing else in my controller actor yet, but a spawn actor on a timer. Why would this interfere?
So I guess, I will need and actor just for pausing and going to my level complete scene.
Is this not weird? There's got to be a conflict somewhere, but I can't find it for my life.