-
Content Count
383 -
Joined
-
Last visited
-
Days Won
19
Content Type
Profiles
Forums
Blogs
Downloads
Calendar
Gallery
Everything posted by ForeverZer0
-
I would have went with something simpler. You can use it for anything you want to "confirm" even. Just use "Confirm_Dialog.show", and it will return a true/false, but suspend processing at the current line. module Confirm_Dialog def self.show base = Window_Base.new(224, 160, 192, 64) base.contents = Bitmap.new(base.width - 32, base.height - 32) base.contents.draw_text(0, 0, base.contents.width, 32, 'Are you sure?') commands = Window_Command.new(192, ['Yes', 'No']) commands.x, commands.y, base.z, commands.z = 224, 224, 9999, 9999 commands.active, commands.index = true, 0 loop { Graphics.update Input.update commands.update break if Input.trigger?(Input::C) } result = commands.index == 0 base.dispose commands.dispose return result end end class Scene_Load alias confirm_on_decision on_decision def on_decision(filename) return unless Confirm_Dialog.show confirm_on_decision(filename) end end class Scene_End alias confirm_update update def update if Input.trigger?(Input::C) return unless Confirm_Dialog.show end confirm_update end end
-
There is nothing really wrong with the idea of the loop, it was just executed incorrectly. Not even the loop itself, but how you handled disposing. I am sure a minor edit could everything, just alter how you close/dispose the window.
-
You are trying to do a strange combination of a scene and a window in the same class. def update @choice = @choice == 1 ? 0 : 1 if Input.trigger?(Input::LEFT) or Input.trigger?(Input::RIGHT) self.cursor_rect.set(@choice * (width - 32) / 2, @prompt.length * 32 + 8, (width - 32) / 2, 32) if Input.trigger?(Input::C) eval("#{@rtrn_var}=" + (@choice == 1).to_s) $game_system.se_play($data_system.decision_se) if @choice == 1 $game_system.se_play($data_system.cancel_se) if @choice == 0 dispose end refresh end That's going to cause an error every time, it refreshes the window after disposing. Disposing a window does not set it to nil, it merely disposes its resources, but the handle remains, hence the "disposed?" method that you can use on it. Also, this: loop do Graphics.update Input.update break unless self update end This loop will not end unless the window is nil. If it is anything but, even disposed it will continue to loop. A better line of code using the same implementation would be: break if self == nil || self.disposed?
-
The text can't be empty. Bitmap's need a size of at least one, although Enterbrain did make an error and allow for some Bitmap sizes to have negative values without throwing an exception.
-
I tend to agree with Chief, although I am not sure its effect on traffic on the site. It would make it easier to navigate, and much more tidy looking. On the other hand, if this site is to be replaced in the near future, it doesn't really make much difference either way. I personally don't "browse" the forum as it is. I am more of a "replier" than a topic starter, so looking down the list of topics where there has been recent traffic suffices for me, personally.
-
Its not. Feel free to write it, since it is so easy.
-
Ah, I see. It looks as if it was part of something else or a larger scene that someone remove d the other code from. I would hope so, since the name of the scene is "Scene_FullPrompt", and there is no "prompt" to be found. Not to mention it closes the game down at the end, since setting the $scene to nil is RMXP's way of exiting the game.
-
What version of RGSS####.dll are you using? I was running some tests using Chinese characters, and I cannot get them to display in a game window, even when the text is written in the editor. Here's the little example scriptlet I made for a test: $data_system = load_data('Data/System.rxdata') $game_system = Game_System.new chinese = '你好世界。' window = Window_Base.new(160, 208, 320, 96) window.contents = Bitmap.new(192, 64) window.contents.draw_text(0, 0, 192, 32, 'Encoding: ' + $KCODE, 1) window.contents.draw_text(0, 32, 192, 32, 'Chinese:' + chinese, 1) loop { Graphics.update; Input.update; break if Input.trigger?(Input::C) } p chinese As you can see, its the same problem I said above. The text displays correctly in the pop-up window, but not within the game window.
-
Hold "Alt" and press "Enter". You can also make it a script call with this: class Interpreter def toggle_fullscreen key = Win32API.new('user32', 'keybd_event', 'llll', '') key.call(18,0,0,0) key.call(13,0,0,0) key.call(13,0,2,0) key.call(18,0,2,0) end end In an event, just use the following script call to toggle back and fourth: toggle_fullscreen
-
ALT + Enter That makes a game full screen. @Heretic: Why load $data_system and $game_system, have the code in a scene, or set the $scene to nil? There is no purpose, and all its gonna do is cause problems. This achieves the same purpose and without errors: unless $game_exists key = Win32API.new('user32', 'keybd_event', 'llll', '') key.call(18,0,0,0) key.call(13,0,0,0) key.call(13,0,2,0) key.call(18,0,2,0) $game_exists = true end I am not sure if that is what you are looking for, or if you are looking for a custom resolution script.
-
I updated the script and it now allows for using strings as IDs also. This will allow you to name values in a way that makes sense in keeping track of things instead of solely arbitrary numbers that mean nothing. I also included a little pop-up window (DEBUG only) that alerts you if a localized string is not found in a file. @azdesign: The problem is not with the script, nor Windows, its RMXP. It uses Ruby 1.8.1, which only contains partial support for Unicode characters. As far as I am aware, there is no real way to "cheat" it. Believe me, I have tried many different encodings, and even manually unpacked the string and tried repacking it with different methods, nothing works. These issues were solved with Ruby 1.9 when it got full Unicode support, but there isn't much that you are gonna do when using RMXP and its outdated version of Ruby. Also, as far as "copyright" stuff goes, this script is the same as any other script I have ever written for RMXP: I could care less if its used commercially, nor do I ask that any profit be given to me. I have absolutely no ambitions when it comes to RMXP on anything commercial. The only thing I have ever asked is that my scripts not be taken and claimed as someone else's, and a simple name in the credits is all the "payment" I require. People have asked before, and I have signed waivers supporting this, as I will do for you if you want. I write (or at least used to write...) RMXP scripts for only one reason: a personal hobby. I could care less what happens to a script of mine, if no one ever uses it, or I never "release" it. It doesn't bother me, the purpose was not for any of that, but just the enjoyment I got creating it.
-
The RMXP help manual. Its in the install directory of the program, you can click the "Help" button in the script editor (bottom-right), press F1 in the editor, or go to About -> Contents in the editor.
-
Just got it done, works perfectly, is simple to use, and supports non-standard characters. I'm gonna make a topic up and post in a little bit. EDIT: I was going to post the topic on this site, but the formatting and BBCode on this site is an absolute atrocity, and I am not reformatting and typing out a whole new topic just to appease it. The whole "preview as you type" thing here is the worse extension I have ever seen added on a forum. OK, rant over. http://forum.chaos-project.com/index.php/topic,12164.0.html
-
Scrive has been dead for years.
-
You can use external files pretty easily. You could even use GetPrivateProfileString from Windows API (use Win32API) to get text based on key/value pairs in an .ini file. Use UTF-8 encoding in the files to eliminate the non-standard characters issue. I can make you a quick method for getting string values from an .ini file using integer IDs if you would like. Actually, I have a pretty good idea for a very basic script that should suit your needs, as well as allow for easy translation. Give me a few minutes and I will post it up.
-
My point is, knowing what other scripts you use allows for making a variation that works. That's why it is important to to let someone know these things when asking for customized scripts. If you choose not to say, there is nothing more I can do to help you.
-
Advice Needed: Complexity of a 2x2x2 Box Creation System
ForeverZer0 replied to RPG's topic in General Game Development
RMXP makes a horrible medium for 3D. Sure it can be done, but only after you strip away pretty much everything that makes RMXP what it is, and simply use native Ruby to hook into the operating system to render to the Window. The same can be achieved with simply downloading Ruby, and forgetting RMXP altogether. Or better yet, use a 3D game creation tool to make 3D instead of a 2D one. Staying on topic, though, I think you need to explain better what the end goal is. Stacking blocks is simply a matter of creating a 3D matrix, and doing some logical operations as to what such as "can block be placed at X, Y, Z". A simple bit operation as senior suggested would be easy enough to implement. I imagine what you are attempting to do is a bit more complicated, and there goals to try and make, layouts or sequences to try for, etc., etc. These determine what exactly how you create the system, not so much just a matter of "stack blocks". -
Don't know what your problem is then. You MUST have some conflicting script. In a brand new project, with only small script from above added: With value set to 40 (default): https://dl.dropbox.com/u/20787370/Temp/40Frames.avi With value set to 10: https://dl.dropbox.com/u/20787370/Temp/10Frames.avi
-
I tested, and the little script I posted does exactly as I said: it shortens the time the battle damage is displayed. I don't know how you didn't notice a difference, I set it to 20 and the effect was kinda hard not to see. If you are using some other type of battle system or custom damage display or something, it could make a difference, but you didn't mention that, so I am assuming you are using the default battle system.
-
No. It simply shortens the duration the damage is displayed. I can say with pretty good certainty that it does that without testing, but I will to make sure. As for you wanting the damage to appear faster, know that damage displays right after the animation is done, so if you want that faster, shorten your animations.
-
You need to change the value of the line with the comment where it says to.
-
You mean how long it displays for, or how quickly it appears? If how long it displays: class RPG::Sprite alias faster_damage damage def damage(value, critical) faster_damage(value, critical) @_damage_duration = 40 # 40 is default. Lower to make faster. end end
-
Dropbox & syncing your web dev work
ForeverZer0 replied to Marked's topic in Computers, Internet and Tech Talk
I don't think that's a problem at all. I have done all type of big files constantly before with no issue, it only occurred when multiple people kept downloading a multi-gig file. You should be completely fine. -
Its not really complex, the help manual does explain it, its just that most people (including myself), never bothered reading the help manual and just jump into creating stuff.
-
Dropbox & syncing your web dev work
ForeverZer0 replied to Marked's topic in Computers, Internet and Tech Talk
DropBox will suspend your account if you have too much activity. I had a 3.X GB file uploaded, and after a few people get to downloading it, they started handing out 3 day bans. I wasn't aware of this drawback until then, and I don't think it happens with any type of "normal" usage, but keep it in mind. Another little trick you can do if you're really bored and hard-up for some extra space, is create dummy email accounts and use sign up, using a virtual machine to install on. That's a big pain in the ass to do, but I actually did it for 2 of my "referrals". Turns out I didn't need to, since before long I was giving referrals and wasn't getting the space for it since I was maxed out.