 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
Aussie Evil

Joined: 28 Apr 2009 Posts: 27
|
Posted: Thu Jun 18, 2009 6:54 pm Post subject: Stupid Question |
|
|
Is there a way to have your game display quick summaries of the party characters when the main menu is open (e.g. like FFVII)? _________________
and you, sir, are no lady |
|
Back to top |
|
 |
Spoon Weaver

Joined: 18 Nov 2008 Posts: 421 Location: @home
|
Posted: Thu Jun 18, 2009 7:17 pm Post subject: |
|
|
yes |
|
Back to top |
|
 |
TwinHamster ♫ Furious souls, burn eternally! ♫

Joined: 07 Mar 2004 Posts: 1352
|
Posted: Thu Jun 18, 2009 8:06 pm Post subject: |
|
|
I'm not sure about exactly what you're after, but it'd be relatively easy to set up menus to display character bios. |
|
Back to top |
|
 |
Aussie Evil

Joined: 28 Apr 2009 Posts: 27
|
Posted: Sat Jun 20, 2009 8:19 am Post subject: |
|
|
See the large box on the left? That's somewhat akin of what I'm wanting to do, probably using 4 separate boxes, not one big one for all 4 party members. _________________
and you, sir, are no lady |
|
Back to top |
|
 |
TwinHamster ♫ Furious souls, burn eternally! ♫

Joined: 07 Mar 2004 Posts: 1352
|
Posted: Sat Jun 20, 2009 8:58 am Post subject: |
|
|
In addition to having a custom menu, this would take a script to manually place boxes and character portraits on the screen.
To place the boxes, you'll want to use:
Code: |
create rect (width, height, style)
|
And to place portraits, you're going to be wanting to read up on Sprite slices.
It'll basically involve:
Code: |
Hero-Portrait-1 := load portrait sprite (num, palette)
set slice x (Hero-Portrait-1, x)
set slice y (Hero-Portrait-1, y)
|
Where Hero-Portrait-1 is probably a Global Variable. |
|
Back to top |
|
 |
Gizmog1 Don't Lurk In The Bushes!

Joined: 05 Mar 2003 Posts: 2257 Location: Lurking In The Bushes!
|
Posted: Sat Jun 20, 2009 10:43 am Post subject: |
|
|
Wow, Aussie. Those are great hero portraits. I'm really looking forward to your game now. |
|
Back to top |
|
 |
binoal

Joined: 20 Jun 2009 Posts: 123 Location: My Own Little World
|
|
Back to top |
|
 |
Aussie Evil

Joined: 28 Apr 2009 Posts: 27
|
Posted: Sat Jun 20, 2009 7:33 pm Post subject: |
|
|
Gizmog1 wrote: | Wow, Aussie. Those are great hero portraits. I'm really looking forward to your game now. |
I hope that was sarcasm... _________________
and you, sir, are no lady |
|
Back to top |
|
 |
Spoon Weaver

Joined: 18 Nov 2008 Posts: 421 Location: @home
|
Posted: Sat Jun 20, 2009 8:09 pm Post subject: |
|
|
Sarcasm DOES have a way of being lost in translation, whilst on the internet.
Anywho, I'd be glad to work with you on your menu script if you want. First, you'll need to decide how you want your script activated. Using the esc button might mean replacing the functionality of all the buttons. This would be bad I think. Though, disabling it's normal function and replacing it with a looping script is not impossible. But looping scripts can be tricky. You'd basically lose the use of all the smaller scripts you might already be using. You could alternatively have the esc button bring up the main menu that has fewer options 1 of which would bring you to your desired menu. There's choices to be made and you're the one to make them.
So, I guess the real question is how much do you know about scripting? |
|
Back to top |
|
 |
Aussie Evil

Joined: 28 Apr 2009 Posts: 27
|
Posted: Sat Jun 20, 2009 9:06 pm Post subject: |
|
|
I could do a replacement of the Status menu. I'll need to check up on my coding. _________________
and you, sir, are no lady |
|
Back to top |
|
 |
Newbie_Power

Joined: 04 Sep 2006 Posts: 1762
|
Posted: Sat Jun 20, 2009 10:22 pm Post subject: |
|
|
Quote: | Anywho, I'd be glad to work with you on your menu script if you want. First, you'll need to decide how you want your script activated. Using the esc button might mean replacing the functionality of all the buttons. This would be bad I think. Though, disabling it's normal function and replacing it with a looping script is not impossible. But looping scripts can be tricky. You'd basically lose the use of all the smaller scripts you might already be using. You could alternatively have the esc button bring up the main menu that has fewer options 1 of which would bring you to your desired menu. There's choices to be made and you're the one to make them. | You make it sound like he'll regret any decision.
Having a game loop that checks for this isn't hard at all as long as you know where to actually call the loop (which should be new game/load game).
And key handling shouldn't be too much of an issue as long as you don't suspend the player (the status screen should still open.) In fact, you don't even have to check for keys at all!
Code: | define constant (0, STATUS_ISOPEN) # Slice extra for keeping track of whether the status display is currently shown, to prevent repeated script calls
script, mainloop, begin
variable (statusdisplay, gameisplaying)
statusdisplay := create container(1, 1) # This slice will be the parent of the rectangles, portrait sprites, and etc for displaying character status on the menu
set slice extra (statusdisplay, STATUS_ISOPEN, false)
gameisplaying := 1
while (gameisplaying) do (
if (menu is open(0) == true) then ( # This is all you have to do. Just check if the menu is open instead of determining keypresses.
if (get slice extra(statusdisplay, STATUS_ISOPEN) == false) then (openstatusdisplay) # The slice extra check is optional, but it helps to have it so that you won't be opening the status screen every game tick
)
else (if (menu is open(0) == false) then (
if (get slice extra(statusdisplay, STATUS_ISOPEN) == true) then (closestatusdisplay)
))
wait (1)
)
end
script, openstatusdisplay, begin
variable (char1rect, char2rect, char3rect, char4rect)
variable (char1portrait, char2portrait, char3portrait, char4portrait)
char1rect := create rectangle(...) # Fill in sizes and position
if (hero in slot(0) == hero:Whatever) then ( # There is no 'get hero portrait' command yet, so do a manual check
char1portrait := load portrait sprite(...) # Fill in portrait here too
)
set parent (char1rect, statusdisplay)
set parent (char1portrait, statusdisplay)
# Repeat for all the character slices
set slice extra(statusdisplay, STATUS_ISOPEN, true)
end
script, close status display, begin
# I would put code here to clean up this, but someone probably has a proper way to do so than I would have
set slice extra(statusdisplay, STATUS_ISOPEN, false)
end |
Okay, that's a little much, but I call up the status display by checking to see if the menu is open instead of relying on keypresses since the menu is already opened by keypresses anyway. This also doesn't replace the normal menu at all, and instead takes full advantage of its existence. _________________
TheGiz> Am I the only one who likes to imagine that Elijah Wood's character in Back to the Future 2, the kid at the Wild Gunman machine in the Cafe 80's, is some future descendant of the AVGN? |
|
Back to top |
|
 |
Aussie Evil

Joined: 28 Apr 2009 Posts: 27
|
Posted: Sat Jun 20, 2009 10:29 pm Post subject: |
|
|
Thanks! With trial and error I can make this work for my game. _________________
and you, sir, are no lady |
|
Back to top |
|
 |
Spoon Weaver

Joined: 18 Nov 2008 Posts: 421 Location: @home
|
Posted: Sun Jun 21, 2009 6:32 am Post subject: |
|
|
Newbie_Power wrote: | Quote: | Anywho, I'd be glad to work with you on your menu script if you want. First, you'll need to decide how you want your script activated. Using the esc button might mean replacing the functionality of all the buttons. This would be bad I think. Though, disabling it's normal function and replacing it with a looping script is not impossible. But looping scripts can be tricky. You'd basically lose the use of all the smaller scripts you might already be using. You could alternatively have the esc button bring up the main menu that has fewer options 1 of which would bring you to your desired menu. There's choices to be made and you're the one to make them. | You make it sound like he'll regret any decision.
Having a game loop that checks for this isn't hard at all as long as you know where to actually call the loop (which should be new game/load game).
And key handling shouldn't be too much of an issue as long as you don't suspend the player (the status screen should still open.) In fact, you don't even have to check for keys at all!
Code: | define constant (0, STATUS_ISOPEN) # Slice extra for keeping track of whether the status display is currently shown, to prevent repeated script calls
script, mainloop, begin
variable (statusdisplay, gameisplaying)
statusdisplay := create container(1, 1) # This slice will be the parent of the rectangles, portrait sprites, and etc for displaying character status on the menu
set slice extra (statusdisplay, STATUS_ISOPEN, false)
gameisplaying := 1
while (gameisplaying) do (
if (menu is open(0) == true) then ( # This is all you have to do. Just check if the menu is open instead of determining keypresses.
if (get slice extra(statusdisplay, STATUS_ISOPEN) == false) then (openstatusdisplay) # The slice extra check is optional, but it helps to have it so that you won't be opening the status screen every game tick
)
else (if (menu is open(0) == false) then (
if (get slice extra(statusdisplay, STATUS_ISOPEN) == true) then (closestatusdisplay)
))
wait (1)
)
end
script, openstatusdisplay, begin
variable (char1rect, char2rect, char3rect, char4rect)
variable (char1portrait, char2portrait, char3portrait, char4portrait)
char1rect := create rectangle(...) # Fill in sizes and position
if (hero in slot(0) == hero:Whatever) then ( # There is no 'get hero portrait' command yet, so do a manual check
char1portrait := load portrait sprite(...) # Fill in portrait here too
)
set parent (char1rect, statusdisplay)
set parent (char1portrait, statusdisplay)
# Repeat for all the character slices
set slice extra(statusdisplay, STATUS_ISOPEN, true)
end
script, close status display, begin
# I would put code here to clean up this, but someone probably has a proper way to do so than I would have
set slice extra(statusdisplay, STATUS_ISOPEN, false)
end |
Okay, that's a little much, but I call up the status display by checking to see if the menu is open instead of relying on keypresses since the menu is already opened by keypresses anyway. This also doesn't replace the normal menu at all, and instead takes full advantage of its existence. |
You don't really address the fact that having a loop, always active, will cause him to rewrite any other scripts he might have, and fit them into the loop. Which is potentially a big project. (Unless he doesn't have any) |
|
Back to top |
|
 |
Newbie_Power

Joined: 04 Sep 2006 Posts: 1762
|
Posted: Sun Jun 21, 2009 10:22 am Post subject: |
|
|
Quote: | You don't really address the fact that having a loop, always active, will cause him to rewrite any other scripts he might have, and fit them into the loop. Which is potentially a big project. (Unless he doesn't have any) | It'll be better for him to have to deal with this issue (which is very easily solved) than to over complicate things.
If he needs an intro for a new game script, then he can just make one and when the player has control, he can simply call the game loop at the end of the new game script. Same for load game script. Then he still has map scripts, NPC triggered scripts, and step on NPC scripts free for him to use for specific things. _________________
TheGiz> Am I the only one who likes to imagine that Elijah Wood's character in Back to the Future 2, the kid at the Wild Gunman machine in the Cafe 80's, is some future descendant of the AVGN? |
|
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
|