Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Sign in to follow this  
Foxkit

Script proofreading

Question

So I have a really boiled down menu for someone *cough cough* dragon *cough cough*. I have the menu coded out, Though I can't check to see if it works right. If someone would spare enough time to look through quickly and see if anything jumps out at them as horrible?

Pastebin

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

I'd be glad to

def update_command
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Switch to map screen
     $scene = Scene_Map.new
     return
   end

lines 41-49 should be moved between lines 50-51: You defined update_command in update by accident it seems.

If you move that block (def update_command...if...end) below the end on line 50, it should all work fine :)

 

Just some advice, trivial matters:

 

@notebook.x = 0
@notebook.y = 0

 

Lines 8 and 9 uneccessary: sprite's x,y values are 0 on initialization

 

@notebook.update

 

Line 36 unecessary: sprite#update only needs to be called to update the flash effect

 

 

Hope this helps :)

Share this post


Link to post
Share on other sites
  • 0

The way its coded, you don't need all the "$game_system.se_play($data_system.decision_se)" in each statement, just the one at the bottom. The way it is now, the SE will be attempted to be played twice in the same update.

Share this post


Link to post
Share on other sites
  • 0

Thanks for looking it over guys, after some help from someone in chat I got the script to run. Should I just post any problems that said script is giving me here? Or make a new thread, not quite sure.

 

also

 

@notebook.update

 

Line 36 unecessary: sprite#update only needs to be called to update the flash effect

 

Is it necessary if its being used from the map?

Edited by Foxkit

Share this post


Link to post
Share on other sites
  • 0

You only need to update it if you plan on using a flash effect on it, which I imagine in this case you will not be, so you will be safe in omitting "notebook.update" as Kell was saying.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...