Jump to content
Nelderson

N.A.S.T.Y. Animated Main Menu

Recommended Posts

N.A.S.T.Y. Animated Main Menu

Nelderson's Awesome Scripts To You

 

I wanted to make something like this for VX, but I guess I got to Ace first..... :P

 

This will make the main menu animated as you go into it.....I plan on implementing a bunch of features, at a later time. I just figured to release it, and see what you think.

 

As always, ask me any question, or suggest something in this thread!

 

 

 

#===============================================================================
#					N.A.S.T.Y. Animated Main Menu
#				  Nelderson's Awesome Scripts To You
# By: Nelderson
# Made On: 12/20/2011
#===============================================================================
# Update History:
# - Version 1.0  - Initial release, made for the shit of it 
# - Version 1.1 - Added the reverse transition for getting out of the menu
#===============================================================================
# *Notes:
# - This script uses moving windows everytime the main menu screen opens!
#  
#===============================================================================
# Credits:
#
# -Nelderson
#===============================================================================
module NEL

 #Transition Speed of the Windows(Higher is faster, and must be above 0)
 TRANS_SPEED = {
  :gold =>  25,
  :command => 35,
  :actor => 50
  }

  #Sets the transitions to come from random directions every time
  RANDOM_TRANS = true ####NOT USED YET#####

end

class Scene_Menu < Scene_MenuBase
 #--------------------------------------------------------------------------
 # ◠開始処ç†
 #--------------------------------------------------------------------------
 alias nel_custom_per_trans start
 def start
	nel_custom_per_trans
	@trans_flag = true
 end
 #--------------------------------------------------------------------------
 # ◠コマンドウィンドウã®ä½œæˆ
 #--------------------------------------------------------------------------
 alias nel_cre_comm_win create_command_window
 def create_command_window
	nel_cre_comm_win
	dir = (rand(4)+ 1).round		
	dir *= 2
	case dir
	when 2; @command_window.y = 416#Down
	when 4; @command_window.x = -160 #Left
	when 6; @command_window.x = 544#Right
	when 8; @command_window.y = 0 - @command_window.height#Up
	end
	@command_win_dir = dir
 end
 #--------------------------------------------------------------------------
 # ◠ゴールドウィンドウã®ä½œæˆ
 #--------------------------------------------------------------------------
 alias nel_creat_goldd create_gold_window
 def create_gold_window
	nel_creat_goldd
	dir = (rand(4)+ 1).round		
	dir *= 2		
	case dir
	when 2; @gold_window.y = 416#Down
	when 4; @gold_window.x = 0 - @gold_window.width #Left
	when 6; @gold_window.x = 544#Right
	when 8; @gold_window.y = 0 - @gold_window.height #Up
	end
	@gold_win_dir = dir
 end

 #--------------------------------------------------------------------------
 # ◠ステータスウィンドウã®ä½œæˆ
 #--------------------------------------------------------------------------
 alias nel_creat_stat_win create_status_window
 def create_status_window
	nel_creat_stat_win
	dir = (rand(4)+ 1).round		
	dir *= 2		
	case dir
	when 2; @status_window.y = 416#Down
	when 4; @status_window.x = 0 - @status_window.width #Left
	when 6; @status_window.x = 544 #Right
	when 8; @status_window.y = 0 - @status_window.height #Up
	end
	@status_win_dir = dir
 end

 def update
	if !SceneManager.background_bitmap.nil? && @trans_flag == true
	  perform_nel_transition
	end
	update_basic
 end

 def perform_nel_transition
	gold_window_trans
	status_window_trans
	command_window_trans
	@trans_flag = false
 end

 def gold_window_trans(dir = @gold_win_dir)
	orig_x = 0
	orig_y = Graphics.height - @gold_window.height
	sp = NEL::TRANS_SPEED[:gold]
	loop do
	  @gold_window.y -= sp if dir == 2
	  @gold_window.y = orig_y if @gold_window.y <= orig_y && dir == 2
	  @gold_window.x += sp if dir == 4
	  @gold_window.x = orig_x if @gold_window.x >= orig_x && dir == 4
	  @gold_window.x -= sp if dir == 6
	  @gold_window.x = orig_x if @gold_window.x <= orig_x && dir == 6
	  @gold_window.y += sp if dir == 8
	  @gold_window.y = orig_y if @gold_window.y >= orig_y && dir == 8
	  Graphics.update
	  break if @gold_window.y == orig_y && @gold_window.x == orig_x
	end
 end

 def status_window_trans(dir = @status_win_dir)
	orig_x, orig_y = @command_window.width, 0
	sp = NEL::TRANS_SPEED[:actor]
	loop do
	  @status_window.y -= sp if dir == 2
	  @status_window.y = orig_y if @status_window.y <= orig_y && dir == 2
	  @status_window.x += sp if dir == 4
	  @status_window.x = orig_x if @status_window.x >= orig_x && dir == 4
	  @status_window.x -= sp if dir == 6
	  @status_window.x = orig_x if @status_window.x <= orig_x && dir == 6
	  @status_window.y += sp if dir == 8
	  @status_window.y = orig_y if @status_window.y >= orig_y && dir == 8
	  Graphics.update
	  break if @status_window.x == orig_x && @status_window.y == orig_y
	end
 end

def command_window_trans(dir = @command_win_dir)
	orig_x, orig_y = 0, 0
	sp = NEL::TRANS_SPEED[:command]
	loop do
	  @command_window.y -= sp if dir == 2
	  @command_window.y = orig_y if @command_window.y <= orig_y && dir == 2  
	  @command_window.x += sp if dir == 4
	  @command_window.x = orig_x if @command_window.x >= orig_x && dir == 4
	  @command_window.x -= sp if dir == 6
	  @command_window.x = orig_x if @command_window.x <= orig_x && dir == 6
	  @command_window.y += sp if dir == 8
	  @command_window.y = orig_y if @command_window.y >= orig_y && dir == 8
	  Graphics.update
	  break if @command_window.x == orig_x && @command_window.y == orig_y
	end
  end
 alias nel_term_trans_win terminate	
 def terminate
rev_gold_window_trans
rev_status_window_trans
rev_command_window_trans	
nel_term_trans_win
 end

def rev_gold_window_trans(dir = @gold_win_dir)
  case dir
  when 2
	orig_x, orig_y = @gold_window.x, Graphics.height
  when 4
	orig_x, orig_y = 0 - @gold_window.width, @gold_window.y
  when 6
	orig_x, orig_y = Graphics.width, @gold_window.y
  when 8
	orig_x, orig_y = @gold_window.x, 0 - @gold_window.height
  end
	sp = NEL::TRANS_SPEED[:gold]
	loop do
	  @gold_window.y += sp if dir == 2
	  @gold_window.y = orig_y if @gold_window.y >= orig_y && dir == 2
	  @gold_window.x -= sp if dir == 4
	  @gold_window.x = orig_x if @gold_window.x <= orig_x && dir == 4
	  @gold_window.x += sp if dir == 6
	  @gold_window.x = orig_x if @gold_window.x >= orig_x && dir == 6
	  @gold_window.y -= sp if dir == 8
	  @gold_window.y = orig_y if @gold_window.y <= orig_y && dir == 8
	  Graphics.update
	  break if @gold_window.y == orig_y && @gold_window.x == orig_x
	end
 end

 def rev_status_window_trans(dir = @status_win_dir)
  case dir
  when 2
	orig_x, orig_y = @status_window.x, Graphics.height
  when 4
	orig_x, orig_y = 0 - @status_window.width, @status_window.y
  when 6
	orig_x, orig_y = Graphics.width, @status_window.y
  when 8
	orig_x, orig_y = @status_window.x, 0 - @status_window.height
  end
	sp = NEL::TRANS_SPEED[:actor]
	loop do
	  @status_window.y += sp if dir == 2
	  @status_window.y = orig_y if @status_window.y >= orig_y && dir == 2
	  @status_window.x -= sp if dir == 4
	  @status_window.x = orig_x if @status_window.x <= orig_x && dir == 4
	  @status_window.x += sp if dir == 6
	  @status_window.x = orig_x if @status_window.x >= orig_x && dir == 6
	  @status_window.y -= sp if dir == 8
	  @status_window.y = orig_y if @status_window.y <= orig_y && dir == 8
	  Graphics.update
	  break if @status_window.x == orig_x && @status_window.y == orig_y
	end
 end

def rev_command_window_trans(dir = @command_win_dir)
  case dir
  when 2
	orig_x, orig_y = @command_window.x, Graphics.height
  when 4
	orig_x, orig_y = 0 - @command_window.width, @command_window.y
  when 6
	orig_x, orig_y = Graphics.width, @command_window.y
  when 8
	orig_x, orig_y = @command_window.x, 0 - @command_window.height
  end
	sp = NEL::TRANS_SPEED[:command]
	loop do
	  @command_window.y += sp if dir == 2
	  @command_window.y = orig_y if @command_window.y >= orig_y && dir == 2  
	  @command_window.x -= sp if dir == 4
	  @command_window.x = orig_x if @command_window.x <= orig_x && dir == 4
	  @command_window.x += sp if dir == 6
	  @command_window.x = orig_x if @command_window.x >= orig_x && dir == 6
	  @command_window.y -= sp if dir == 8
	  @command_window.y = orig_y if @command_window.y <= orig_y && dir == 8
	  Graphics.update
	  break if @command_window.x == orig_x && @command_window.y == orig_y
	end
  end
end

 

 

 

EDIT: Updated script for transitions upon leaving the main menu.

Edited by Nelderson

Share this post


Link to post
Share on other sites

That's alright. Nobody is nasty... ;)

 

Oh yeah, I had something meaningless to add: kudos.

 

Seriously though, you should try implementing little .gif-like icons.

Edited by ???nOBodY???

Share this post


Link to post
Share on other sites

How would you set it up to close the same way it opens?

 

Updated the script to transition out of the menu scene! :D

 

Where are the screenshots? I want to see what the script does...

 

Really???....I don't feel like making an animated gif to show you....just take the 5 seconds to actually put it in and try it..... <_<

Share this post


Link to post
Share on other sites

Yeah, it's not something that screen shots will show honestly.

You have to just try it, it basically slides the windows in and out from the sides of the screen rather than having them simple fade in, which looks a lot nicer in my opinion.

Share this post


Link to post
Share on other sites

Cool this will definetely spice things up a bit...I have to ask...what does N.A.S.T.Y. stand for?

Nelderson's Awesome Scripts To You

 

 

Rosenblack FTW!!!!! :lol:

 

BTW: If you guys want me to expand this, give me some ideas!

Share this post


Link to post
Share on other sites

Cool this will definetely spice things up a bit...I have to ask...what does N.A.S.T.Y. stand for?

Nelderson's Awesome Scripts To You

 

 

Rosenblack FTW!!!!! :lol:

 

BTW: If you guys want me to expand this, give me some ideas!

I'm almost never off this site for more than an hour unless I'm sleeping and when I am online I read everything and learn it.

Share this post


Link to post
Share on other sites

Oh wow, yeah I totally should've saw that! Now I feel like a dope, thanks for clearing that up. So what's next on the NASTY agenda? A script that does my homework? Or perhaps a script that makes dessert?

Share this post


Link to post
Share on other sites

Cool this will definetely spice things up a bit...I have to ask...what does N.A.S.T.Y. stand for?

Nelderson's Awesome Scripts To You

 

 

Rosenblack FTW!!!!! :lol:

 

BTW: If you guys want me to expand this, give me some ideas!

 

Maybe make it a bit more customizable, make it not so random, and have it set up so people can set the speed and where the screens come from.

Honestly, any customization others can do simply and effectively, is all it needs really.

Share this post


Link to post
Share on other sites
]Really???....I don't feel like making an animated gif to show you....just take the 5 seconds to actually put it in and try it..... <_<

 

I can't, Ace has not been translated to english yet. And from what I gather, trial comes with too many limitations.

Edited by MISTER BIG T

Share this post


Link to post
Share on other sites

Nelderson wats up guy! Nice to see you here. Not using the logo anymore? It is one of my favs I have done.

and I would also like you to a screen shot or two.

 

Now where is a side battle system (not the generic simple one)?

Share this post


Link to post
Share on other sites

Anyway to make the title screen do this too?

Also Nelderson I'd like to see you make a animated title screen for Ace...please. or make the two layer title screen be able to scroll the pics?

Share this post


Link to post
Share on other sites

this script gave me a good laugh when i noticed that the screens pop in in different order everytime. ^_^ just wanted to test it, but i think i may keep this piece of Code... its actually quite awesome. =)

Share this post


Link to post
Share on other sites

@Rosenblack,

Why you no admin?!

Anyways. Just tried this script. Simple, yet SLICK.

why would you want me as an admin, i just sort out the msl

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted