Author Topic: [RMXP][RESOLVED]Help with menu script  (Read 204 times)

Offline jayje

  • Awakened Visionist
  • **
  • Posts: 55
  • LV: 2
  • Gender: Male
  • The First Maker
    • View Profile
    • The Offical Monstructs: Makers and Mayhem Site
[RMXP][RESOLVED]Help with menu script
« on: July 08, 2018, 04:55:08 AM »
 :^_^\': Hey gang!  :^_^\':

I have this custom menu that shows the Monstructs that you 've created (kinda like a bestiary)
(click to show/hide)

Problem is I this image in the background:
(click to show/hide)

I've been trying to figure out how to do this and i've been failing miserably.

here is the script:
(click to show/hide)

Any help will def be appreciated. :haha:

EDIT:
"code" tags are much easier to read code from than "quote" tags  :)  - Zer0
« Last Edit: July 08, 2018, 03:02:48 PM by jayje »



Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6591
  • LV: 407
  • Gender: Male
    • View Profile
Re: [RMXP]Help with menu script
« Reply #1 on: July 08, 2018, 05:08:18 AM »
Did you know you don't actually need to create a window to show a picture?

Code: (ruby) [Select]
# Put this above the loop in your Menu.
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("picture name here")
# Then just make sure to dispose it like everything else
@picture.dispose

EDIT: Just poked through your code too, one thing I would suggest since you only want to show 6 commands at a time, do this to your command window. It should take care of the rest.

Code: [Select]
@command_window.height = 32 * 6
Then you don't have to calculate your index.
« Last Edit: July 08, 2018, 05:13:21 AM by G_G »

Offline jayje

  • Awakened Visionist
  • **
  • Posts: 55
  • LV: 2
  • Gender: Male
  • The First Maker
    • View Profile
    • The Offical Monstructs: Makers and Mayhem Site
Re: [RMXP]Help with menu script
« Reply #2 on: July 08, 2018, 05:16:08 AM »
you know i tried to find a way to do that lol :^_^\':. also did you mean just above "# Main loop"?



Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6591
  • LV: 407
  • Gender: Male
    • View Profile
Re: [RMXP]Help with menu script
« Reply #3 on: July 08, 2018, 05:36:32 AM »
Yes, above the loop in main.

Offline jayje

  • Awakened Visionist
  • **
  • Posts: 55
  • LV: 2
  • Gender: Male
  • The First Maker
    • View Profile
    • The Offical Monstructs: Makers and Mayhem Site
Re: [RMXP]Help with menu script
« Reply #4 on: July 08, 2018, 05:58:37 AM »
ok. and where would i put this?

Quote
@command_window.height = 32 * 6

also i got this error:

"Script 'Window_Command' line 18: RGSSError occurred. failed to create bitmap"

here is the updated script with your edits:

(click to show/hide)
« Last Edit: July 08, 2018, 06:20:15 AM by jayje »



Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6591
  • LV: 407
  • Gender: Male
    • View Profile
Re: [RMXP]Help with menu script
« Reply #5 on: July 08, 2018, 07:08:40 AM »
That is an issue with your Window_Command, not the sprite. Remove all of your Window_Command code that you put in. Remove all the index calculating. Its a recipe for disaster. Also you put the @command_window.height line within the same group of code where you create your command window.

EDIT:

I cleaned up your script, see if this solves your issues.

(click to show/hide)
« Last Edit: July 08, 2018, 07:14:49 AM by G_G »

Offline jayje

  • Awakened Visionist
  • **
  • Posts: 55
  • LV: 2
  • Gender: Male
  • The First Maker
    • View Profile
    • The Offical Monstructs: Makers and Mayhem Site
Re: [RMXP]Help with menu script
« Reply #6 on: July 08, 2018, 03:02:22 PM »
thanks. do you have a twitter or instagram handle? wanted to shout you out.