Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

graphics.freeze

so basically, I have created my own ABS system with events, and I want to be able to have a menu screen pop up so you can choose weapons. I looked at the script for menu and sure enough there was a command called graphics.freeze . Me, I know nothing about scripting, but common sense tells me this freezes the graphics currently on screen and allows you to resume them afterwards.

How would I call this section of the script? What would I have to do, just use call script? or have a script created? which ever it is, I'll be delighted to see what you come up with :) Many thanks :D
 
Do you want it so that you can call the regular in game menu? If so, I can explain to you how to set it up :)

At what phase of battle does the menu get called (is it at the end of a turn, start, etc.)?
 
It is possible to do what you want, but not the way you are thinking of doing. The problem with using Graphics.freeze is that it stops all graphics processing, including windows and menus and such.

In the menu, when you saw Graphics.freeze be called, that is what the Menu system does when it is "killing" itself to allow the next scene to be called. It stops all of the graphics from being updated, then it disposes of all of it's sprites and then waits for the next scene to call "Graphics.transition" that way you will not see each sprite be deleted and the new scene's sprites be drawn one by one. Instead, it will give the graphics the orders to do all of this and say "Don't do anything until I am ready, and then do everything at once once I say so"

Since you are making your own script, I am going to assume you are asking how you would go about doing this yourself, and are not asking us to do it for you. What you have to do is, when you want the menu to come up, you create your windows and stop updating everything but these windows (unless you want stuff like idle animations playing, you can leave those updating) Then you let these windows process and then you get rid of them when they are done. One way you could do this is modify the Map script to have something like this: (This is not real code, it's just to give you an idea)
Code:
if $menu
@window1 = YourWindow1.new
@window2 = YourWindow2.new
etc. etc.
while $menu
@window1.update
@window2.update 
etc. etc.
process the info from your windows here
when your windows give you info for quit do $menu = false
if !$menu
@window1.dispose
@window2.dispose
etc. etc.
end
end
end

And then  in call script event you can do $menu = true to call the menu.

this is a little hackish, but anything you do with events and scripts hybrid is going to be like that. If you are unsure about how to process information from windows, just take a look at the different menu and shop and save etc. scenes.
 
DeM0nFiRe":382xu5hz said:
Since you are making your own script, I am going to assume you are asking how you would go about doing this yourself, and are not asking us to do it for you.

actually man, I have no idea how to script...:S I was planning on making a menu system with events (its the only way I know how...-_- *fail*) using show picture commands and variables. Thats why I was wondering how to make graphics freeze behind the menu, because I want the graphics to freeze, as storing EVERY character's x and y values into variables and then loading them to that state would, well, take up all my variables way to fast <_<

from the first spoiler, I begin to wonder, what does save the character's location when using the menu from scene_menu? would it be possible to call that part of the script or maybe create a script that has the same effect? sorry if this is really n00bish, I have no comprehension of scripts, but I'm pretty awesome with events :) many thanks if anyone can help
 
No man, to do what you want you'd have to either do it by scripting or you would have to make it so that every event switches pages to a stationary page when  certain switch is on.
 
what do you mean by this? you mean have a show picture command of a menu, then graphics freeze, then have a conditional branch if down is pressed and then have a graphics transition (obviously with more conditionals in there to make the thing actually work)...?
otherwise, I have no idea what you mean :P. Then again, what I just said made no sense <_____< so I have a high feeling you mean something completely different?

I'm trying to think of an alternate method, maybe something to do with no scripts, having something like X tiles flood the screen so the characters can't move.

any additions to this idea or any other ideas or explanations would be greatly appreciated :) thanks for reading and thanks for your time
 
What I mean is in *every* event you would have a second event page that activates when a game switch that you make that indicates the menu is on. ON that scond event page, there would be no movement or anything happening until the menu goes way, that way the game doesn't continue while the menu is open.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top