Title Page (Solved)

Started by Cybernet_Surfer, Sun 15/01/2006 00:59:39

Previous topic - Next topic

Cybernet_Surfer

I looked through the help file and some of the topics here.  But I haven't been able to discover anything about creating a title page.  I have the title room created.  I just need to know how to make it the first room that shows up without having the character there or the top bar to be there.  Thanks in advance.
I work to create games that have morals and virtues in them.

Akumayo

Well, as for making the character invisible, in the editor, on the room page, there is a box you can tick that says "Hide player character".  As for the topbar gui, in the script for the room, under "Player Enters Screen (before fadein)", use Game - Hide GUI.  Then under, "Player Leaves Screen", use Game - Show GUI
That should do it.
"Power is not a means - it is an end."

Cybernet_Surfer

I got it set as the title page.  However, the mouse cursor is set to the look cursor.  I was looking for a command to set it to the pointer like the one used in the inventory screen.  Once again.  Thanks in advance.  And thanks for the previous help.
I work to create games that have morals and virtues in them.

Akumayo

You'll have to script that.  Under "Player enters room (after fadein)" Click on "Run Script".  Then click "edit script".  In the script window, insert this line:
Code: ags

Mouse.Mode = eModePointer;


-Regards, Glacies Akumayo
"Power is not a means - it is an end."

Cybernet_Surfer

Thank-you once again.  Now I have another question.  I appologise for having so many but as you've probably guessed I'm new at this.  I'm making four button options on the title screen.  I've got the "New Game" button to work.  But now the "Save" and "Load" buttons are causing me trouble.  I haven't worked on the "Exit" button yet but I didn't see an option for quiting the game.  To make these I'm using objects in the room.  I considered that I might need to be using GUIs.  Any help you can give me would be great.
I work to create games that have morals and virtues in them.

Akumayo

You don't need a GUI, objects will work just fine.  For saving, under the "Any click on object" section, again choose "Run Script", and open the script.  Place line there:
Code: ags
SaveGameDialog();


Do the same for load, but place this line:
Code: ags
RestoreGameDialog();


For exiting, use this line:
Code: ags
QuitGame(1);


That should work out properly.
"Power is not a means - it is an end."

Cybernet_Surfer

Thank-you.  The Load and Exit parts worked just fine.  But after I posted my last message I realized that I didn't need a Save Game button on the title screen.  Instead, I may add a button that will allow you to go to a different room and see an intro movie.  I will work on that myself and see if I can get it to work.  But once again, thanks for your help.  It has save me much trouble.  With the title screen finished and some new information at my fingertips, I think I can now dive into my game and see what I can do on my own.  If I happen to encounter a big problem then I'll be sure to come back here.
I work to create games that have morals and virtues in them.

mozza

Sorry if it seems I am "hijacking" this thread at all, but if you clicked the right mouse button on that title screen, would it change cursor? How can you change this?

Elliott Hird

I dont think you can right click away from the pointer but if you can, you'd have to use the rooms on_mouse_click and something like CatchEvent() (is that it?)

Ashen

You can right click off eModePointer, just not on to it, and the function is ClaimEvent(), but that's basically right.

You could also modify the global on_mouse_click to ignore right clicks in the title screen room. E.g.:
Code: ags

  else if (button == eMouseRight && player.Room != 0) { // right-click, so cycle cursor
    mouse.SelectNextMode();
  }
I know what you're thinking ... Don't think that.

Cybernet_Surfer

I attempted to use the script that Ashen gave me.  But I'm not too sure how to insert it.  Should I add another command for "Player enters room (before fadin)" and use run script, or should I just add this script to the other run script command I have?
The other scrip command I have says

1  // script for Room: Player enters room (before fadein)
2Mouse.Mode = eModePointer;

The title room is actually room4.  If I could get a specific code for this it would be really helpful.  Working in code is something I need to learn a lot more about.
I work to create games that have morals and virtues in them.

Ashen

#11
QuoteShould I add another command for "Player enters room (before fadin)" and use run script, or should I just add this script to the other run script command I have?
Neither of them.

Either:
The code I gave needs to go in
Quote from: Ashen on Sun 15/01/2006 12:12:36
the global on_mouse_click

So, open the Global Script to on_mouse_click (Ctrl-G and scroll down, or just select it from the 'Script' menu), find this part:
Code: ags

  else {   // right-click, so cycle cursor
    mouse.SelectNextMode();
  }


And replace it with the code I gave (change the 0 to 4).

Or:
The code Elliott suggested needs to go in the room script (Ctrl-E or the '{}' button on the Room Settings window).
There should be a few functions already there (like teh one for 'Player enters room') click the cursor somewhere outside of them, and put this in:
Code: ags

function on_mouse_click (MouseButton button) {
  if (button == eMouseRight) {
    ClaimEvent();
  }
}

What this does is stop the global on_mouse_click from running when the right button is pressed - left will still work as normal.


Somethings to keep in mind with both ways:
You'll need to put the interactions (for load game, quit game, etc) in the 'Any Click on ...' interaction. Akumayo already said this, but it bears repeating.
You'll also need to put something in 'Player leaves room' to change the cursor back to a normal mode. mouse.Mode = eModeWalkto; should do. This isn't totally necessary, but will look better than the player having to cycle off eModePointer themselves, before they can do anything.

I know what you're thinking ... Don't think that.

Cybernet_Surfer

I made the additions and it works great.  Though for some reason it changes the cursor to the "look" cursor instead of the "walk" cursor.  I tried to make it change to the other cursors and it worked fine.  But it wont work for the "walk to" cursor.  And I did check to make sure that the cursor was called the "walk to" cursor.  But it doesn't effect my game too much.  Thank you all for your help.
I work to create games that have morals and virtues in them.

Ashen

I see you've got the player character hidden on the Title Screen - are they visible in the new room? Logically enough, 'Walk to' is disabled when there's no visible character to do the walking.

Still, as you said, it doesn't effect it much, and if everything else works OK, I wouldn't worry about it.
I know what you're thinking ... Don't think that.

JRock

Don't know if you resolved this issue yet, but heres what I usually do for the title screen when I only want the Pointer (no other cursors or GUI's) visible.

Quote
// script for Room: Player enters room (before fadein)
gIconbar.Visible = false;
mouse.DisableMode(eModeInteract);
mouse.DisableMode(eModeTalkto);
mouse.DisableMode(eModeLookat);
mouse.DisableMode(eModeWalkto);
mouse.DisableMode(eModeWait);
mouse.Mode = eModePointer;

Hope this helps  :=

Cybernet_Surfer

The topic has been resolved.  But if you go back and look at the suggestions for my title screen then you could use the same thing on yours.  It takes up less script space.  Though I don't think script space is ever a problem in this.  Thanks anyway though.
I work to create games that have morals and virtues in them.

Ashen

So what WAS the problem?
Also, if this is now solved, can you edit the topic to show that? I would, but I don't want to, if it's still on going.
I know what you're thinking ... Don't think that.

Cybernet_Surfer

#17
The problem was just getting my title page to work.  That's all.  I just ran into several problems along the way.  I'll set it to resolved.

Edit:

I can't figure out how to set it to thumbs up.  If someone could explain it that would help.  And I did look through the help file to figure out how to do it.  But I couldn't find it.  Sorry.
I work to create games that have morals and virtues in them.

Ashen

There ya go. For future reference, it's the 'Message Icon' drop-down menu, below the subject -  but as long as you include 'Solved' in the subject, that doesn't matter.

Also, I meant: What was the problem with the cursor changing to 'Look' instead of 'Walk' - or did you mean "the topic has been resolved" as in, it works well enough so you'll just leave that bit?
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk