Ok, so I checked out the Buttons Example and went off of it and made a button of my own. But when I go to click onto a button it doesn’t go to the scene I want it to. Could you guys help me out with this?
Thanks for taking the time to read this post, any help is appreciated like always.
Are you making a native or web game?
I would try something like this:
if Cursor is on myButton then
– if animation = 0 then animation = 1
– if Button Left is pressed then
---- if animation = 1 then animation = 2
---- Go to scene LevelSubUrbanHouse
if Cursor is not on myButton then
– if animation = 1 then animation = 0
In preview mode “Go to scene” action doesn’t change the scene, but writes a message at bottom, like: “In the compiled game, it should changes to scene SceneName”.
Try to compile the game and test if it changes the scene.
Ok, well then how else can I go to the other scenes? Also, how would I make a certain scene the first/dominant scene like a main menu? Because at the moment the game starts in one of the levels. I compiled the game and didn’t get the main menu when I started the game up.
The first scene to be launched is the first scene in the list, so just move the main menu so that it is the first scene.
This is the only way (with the “Go to scene” action) , In preview mode (when you click the “Play” button) you are testing your scene, only the current scene is compiled, it’s compilation is fast. As only one scene is compiled, GD can’t change your scene in testing, but send you a message saying “If you compile your game, your Go to scene action would run now”.
This means, when you compile your entire game (compile every scene, in File=>Compile or somethig like that) your game will change the scene.