Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: LadyFreotasor on Fri 14/06/2019 05:52:29

Title: GUI Button to start game
Post by: LadyFreotasor on Fri 14/06/2019 05:52:29
So I have started making my character creation screen and I cant for the life of me figure out how to make the "Confirm" button send you into the gamr (ie transfer the character to the proper room).  I've tried searching through the manual and the forum but I haven't been able to succesfully locate what I need.

thanks in advance!
Title: Re: GUI Button to start game
Post by: Laura Hunt on Fri 14/06/2019 07:07:38
Hey, so in the editor, click on the "Confirm" button you've created and look at the "Properties" panel on the right. Click on the little lightning bolt thingie and you'll see an event called YourButtonName_OnClick. Click on the three dots "..." and you'll be taken to the global script where a new empty function will have appeared. Just add the ChangeRoom command to that function, and I guess you want to make the character creation GUI invisible too:

Code (ags) Select
function YourButtonName_OnClick(GUIControl *control, MouseButton button)
{
   gYourCharacterCreationGUI.Visible = false;
   player.ChangeRoom(insertnumberofstartingroomhere);
   
}
Title: Re: GUI Button to start game
Post by: LadyFreotasor on Sun 16/06/2019 02:20:14
Bless your soul thank you!