#=========================================================================== # Simple Scrolling Text Window Script. # By Omegas7. #=========================================================================== # # Commands: # User a in game script call command: # # $omegas_text.show_text("text") # Replace text with the desired text to appear. # # $omegas_text.clear_text(N) # Replace N with a number. # 0 = Clear all text. # 1 = Clear text in slot number 1. # And so on. # # $omegas_text.change_opacity(N) # Replace N with a number. # The number may be from 0 to 255. # That will change the window opacity. # #===========================================================================
class Omegas_Window < Window_Base
def initialize super(0,305,545,110) $opacity = 125 if $opacity == nil self.contents.font.size = 16 $text_line = [] if $text_line == nil $need_update = false if $need_update == nil refresh
Nice 1st script! Although I don't know why you needed a lot of global variables, since they're just used inside the class anyway, you might want to change those to instance variables instead (or class variables probably).
Group: Member
Posts: 77
Type: Event Designer
RM Skill: Advanced
You mean fix it like this? Ya....
Just so you know, there is an error on the script in the spoiler. It's very tiny, but it's on line 110:
CODE
$omegas_text = Omegas_window.new
'w' in window should be capitalized. Moving on...
Your script is simple but it definitely works great! It's not exactly what I'd like to see in the overhead view game style RPG maker produces, since it takes up a large portion of the screen.
Here is the results of some personality quiz I have no idea about: "You are helium. After hydrogen, helium is the most abundant element in the universe. Helium is stable. Chemically speaking, it tends to keep to itself, with no real inclination to react with other elements. Helium is a gas that is lighter than air. Helium has the lowest melting point of any element. The melting point is so low that it would not solidify even at absolute zero under ordinary pressure."
After doing this personality quiz, it became apparent that I need a life....
[Show/Hide] VX Mini Tutorial: How to check the leader of the party
Create a condition branch. Go to page 4 of this condition branch and select script. Type in this:
CODE
$game_party.members[#] == $game_actors[#]
Change the # in $game_party.members[#] to whichever party member you want to check (0 = leader, 3 = 4th member). Change the # in $game_actors[#] to whatever actor you want to check (from the database. (according to the actor id number) 1 = first person in database)
If I'm not being helpful, don't shoot me. I'm still Canadian.
The squares are there because the window does not properly escape carriage return/line feed characters (i.e., when you press enter). Don't press enter when typing in the text (as shown above), or pass in an array of strings instead of a single one.
I would suggest using Window/Game_Message to display the text so that the player can close the window using the action button. Nice progress you are making Omegas, keep it up.
For the past couple of months I've been learning RGSS and I've got the basic stuff down such windows, variables, conditional statements, ect. But, I can't see myself making big scripts such as a jumping system or a side view battle system. I was wondering how you learned to script because I really want to know how to script really well.
Thanks in advance.
Hey there,
Well I don't make battle neither though I can still teach you some things :)... The way I've learned to script is by reading other scripts for the most part. I've allways been interested in other peoples work but this time I though I had to try to make something myself...and it worked!! The most importand thing when you go scripting is (at least in my case) that you want to make something to help an other wich can't script. You also need to feel the competition that's around in the scripting-community. Cause, I have to say, if you get pushed to get a sertain request done before an other scripter does, you feel POWERFULL!! :P So that's an other thing... You also don't need to be afraid to learn from others or helpfiles. When I write my scripts, I actualy always have the helpfiles open to look things up I don't know or remember. Then, you must be calm, cause you need to try the script a lot of times. When I write a script, I test it after almost every changes. First I set up the major structure. Like when I make a window-script or part of a script I start with something like this:
CODE
class Window_Name < Window_Base def initialize(x,y,width,height) super(x,y,width,height) refresh end
def refresh self.contents.clear draw_contents end
def draw_contents draw_something(with, some, parameters) end
def update refresh if @something != @what_it_should_be end end
So that's also very important. Then, the biggest thing I learned scripting from is TRIAL AND ERROR. That's the most irritating way to learn something, cause it's more ERROR than TRIAL, but it does the trick realy good.
So that's it how I did it. Now it's up to you. Do some requests (if I didn't do it allready :P) and learn from them.
Hope that helped you out a little. If not, keep your eye on the Scriptology-topic (see my sig) where I'll be updating for my scripting(video)tutorials. Perhaps they're going to be usefull for you one day ;)
recruiting: writer(for the dialogues), mapper and eventer... visit this thread to join: Grendis Recruitment Thread "You can tame a lion, but you can never make it vegetables"
recruiting: writer(for the dialogues), mapper and eventer... visit this thread to join: Grendis Recruitment Thread "You can tame a lion, but you can never make it vegetables"