Trouble with some behaviours
Hello,
First of all, i'm new to GameSalad, and using a windows computer and therefor the Windows creator.
What I want, is an app that keeps memorise of the last actions, so if people close the app and start it again, they have the same screen or level that they were when they closed the app. Is this possible?
The trouble by creating my game is now, I want, when a certain button is pushed, that the character goes to sleep for 1 hour. And in that hour, no other buttons can be touched and the main character/actor is really asleep and it's not possible to do any other actions for an hour long.
How could I make this?
Best regards,
Bas Goodboy.
First of all, i'm new to GameSalad, and using a windows computer and therefor the Windows creator.
What I want, is an app that keeps memorise of the last actions, so if people close the app and start it again, they have the same screen or level that they were when they closed the app. Is this possible?
The trouble by creating my game is now, I want, when a certain button is pushed, that the character goes to sleep for 1 hour. And in that hour, no other buttons can be touched and the main character/actor is really asleep and it's not possible to do any other actions for an hour long.
How could I make this?
Best regards,
Bas Goodboy.
Comments
For your hour of sleep, create a Boolean attribute called Sleep. Set it to false.
When the player goes to sleep, set that attribute to true.
Go inside each of your buttons, and in the rules that say when touch is pressed, add another condition : When attribute game.Sleep is false
This will only allow the buttons to be pressed when that attribute is false.
When the player wakes up, set game.Sleep to false.
Hopefully that gets you on the right track.
Should I creat the Boolean on the scene or or the button actor called 'sleep'.
?
'For your hour of sleep, create a Boolean attribute called Sleep. Set it to false.
When the player goes to sleep, set that attribute to true.'
How can i do this thing:
When the player goes to sleep, set that attribute to true.'
Whats the 'code' for this?
After a bit of trying i think i almost got it..
Only I need the rule for changing the Sleep attribute Boolean from false to true.
So when touch is pressed > change attribute game.Sleep to: .....
What should come on the ...??
In other words.. how can I choose to change the true/false indicator on the Boolean?