 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
vandam

Joined: 04 Jun 2005 Posts: 34 Location: somewhere over the rainbow
|
Posted: Sat Oct 15, 2005 4:27 pm Post subject: tittle menu |
|
|
Im not a wiz when it comes to scripting.
I just need some help on a menu screen
Im pretty shure its a script that does this,
you know when you get the option to choose to play, credits etc.
If you can tell me how to do this I wll appreciate it. _________________
 |
|
Back to top |
|
 |
tgfcoder
Joined: 14 Oct 2005 Posts: 37 Location: Australia
|
Posted: Sat Oct 15, 2005 5:50 pm Post subject: Solution |
|
|
I thought I knew how to do this but then I found there was no Title Screen special plotscript.  |
|
Back to top |
|
 |
Mike Caron Technomancer

Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
Posted: Sat Oct 15, 2005 10:19 pm Post subject: |
|
|
To do something like that, you need the shiny new Skip Title Screen and Skip Load Screen bitsets. That will automatically skip to a new-game. Thusly, if you want a custom title screen, you put it in the new-game script.
The benefit of this is that you can do something like a title demo if you want. But, that's beyond the scope of this post.
This will assume the following things happen on start up:
1. The title screen appears
2. The menu pops up when the user presses space/enter.
3. The user selects an option, then presses space/enter to select it.
So, let's say you have three options: New Game, Load Game, Credits.
First off, make your title screen, and import it. Then, make three copies with the menu on it. Each of the copies should have a "cursor" pointing at/highlighting the three options. Import all those in order of the menu (Important!!!!!!!11one)
Now, you need a script. I'll leave it as an excersise to you to integrate it into your existing plotscript.
Code: |
script, title menu, begin
variable(cursor, firstmenu,inner menu,outer menu)
#first menu is the index of the first menu backdrop
firstmenu = 1 #it's probably something else
fade screen out #we need to hide our dirty dealings...
stop song
wait (1) #hmm, needing this is probably a bug... meh, later
show backdrop (0) #change this to the plain title screen
wait (2)
play song(song: title) # dramatic effect
wait (15) # wait a second after the music starts
fade screen in #you can probably tweak this intro...
wait for keypress #review: we've shown the titlescreen, and are waiting to go
show backdrop (firstmenu) #now we start the menu bit
outer menu := true
while (outer menu) do, begin
inner menu:= true
while(inner menu) do, begin
if(key is pressed(key:up)) then, begin
cursor -= 1
end
if(key is pressed(key:down)) then, begin
cursor += 1
end
if(cursor << 0) then (cursor := 0) #you can swap the "cursor :=" bits to
if(cursor >> 2) then (cursor := 2) #make the menu wrap
show backdrop (first menu + cursor)
wait(1) #maybe 2, try it out
if(key is pressed(key:space)) then (inner menu := false)
end
if(cursor == 0) then, begin #new game
#call your real new-game script
outer menu := false
end
if(cursor == 1) then, begin #load game
#you need to show the menu. Unfortunately, this isn't as easy
#as it seems. Thus, the ball's in your court.
#if the load menu succeeds (and the game is loaded, set outer menu to false
#if you want to go back to the title screen, leave it set to true.
end
if(cursor == 2) then, begin #credits
#call the credits script
#leave outer menu set to true, so that it'll loop back to the menu
#when the credits are done.
end
end
end
|
I wrote this from memory. Thus, there is likely bugs and what not. I'll help you fix it when you get a chance to try it.
I also notice that it doesn't support quitting. Well, you can easily do that by adding a new menu option, and adding the appropriate code (call "game over" in the conditionals at the end) _________________ I stand corrected. No rivers ran blood today. At least, none that were caused by us.
Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ |
|
Back to top |
|
 |
vandam

Joined: 04 Jun 2005 Posts: 34 Location: somewhere over the rainbow
|
Posted: Mon Oct 17, 2005 12:36 am Post subject: |
|
|
Cool thanks guys. _________________
 |
|
Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|