Author Topic: GUI Button to start game  (Read 220 times)

GUI Button to start game
« on: 14 Jun 2019, 05:52 »
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!
« Last Edit: 16 Jun 2019, 02:20 by LadyFreotasor »

Re: GUI Button to start game
« Reply #1 on: 14 Jun 2019, 07:07 »
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: Adventure Game Studio
  1. function YourButtonName_OnClick(GUIControl *control, MouseButton button)
  2. {
  3.    gYourCharacterCreationGUI.Visible = false;
  4.    player.ChangeRoom(insertnumberofstartingroomhere);
  6. }

Re: GUI Button to start game
« Reply #2 on: 16 Jun 2019, 02:20 »
Bless your soul thank you!