This is more of the structure in Ruby. I'm quite curious as to why it goes down to up rather then up to down?
For example
class one #blahend class two @blahend
Why exactly does class two come first? I found it odd that it does this.
It reads it in order that they're put in. Perhaps your class 2 was an adjustment to an already made class so it looks like it's reading it first?
Like
class CustomScript stuffendclass Game_Map some editsendGame_Map already exists so if it's defined in the scripts before you Custom class, then it'd read the original class (plus all the edits to it) first..at least that's my understanding
Yes, the scripts are read in the exact order they are inserted into the script editor. I'm pretty sure it reads all modules before classes too, but I could be mistaken on that.
That is why custom scripts must be placed before the 'main' script. The main process triggers SceneManager.run which begins execution of scenes.
@Tsukihime: He/she is confused about overwrite order, as in the last definition og method/class two will override the first, while the example is wrong.
The reason this is like this is because definitions are read from first to last, top to bottom: the last definition of any method or class will override earlier ones, unless you specify you'd rather extend it.
I was watcing DaP3 video tutorials, and he was explaining like that. I must have misunderstood what he said.
Which video? What time? Are you still confused?
How do you exactly decrease the maximum value of all the parameters of an actor under a certain condition? Say a state?
Yeah I'm still a little confused. Its the Class Hierarchy video I think. I'd have to re watch it and see.
I believe computer works is linear, so the simple idea is, if there wasn't class two defined in anywhere else before class one is defined, then the system will read as that class one comes first before class two, it's as simple as that. That's what I thought until now. But in RGSS3(Script Editor) you should be aware that custom scripts by other peoples may(in fact usually) redefine a same class from the default script. That's why you may think that(sorry if you don't) the redefined class is comes first, but if you search the hirearchy above, you should find that the class has been defined before. Using CTRL + Shift +F upon the class name to check if the said class has been defined at the upper hirearchy of Script Editor is a good way to find out. Sorry for my english, I try to explain with the best diction I can 🙂 .
I would like to know how to just print out in my ItemList an item tagged with a note tag. For example, in the Window_ItemList, we have this:
#-------------------------------------------------------------------------- # * Create Item List #-------------------------------------------------------------------------- def make_item_list @data = $game_party.all_items.select {|item| include?(item) } @data.push(nil) if include?(nil) endBut instead of showing all items I have, I only want to show those items tagged with for example: <coin>
And if there is a reverse where I only wanted to show those items not tagged with <coin> should show.
Hey guys, so when selecting a new game, it fades the screen in by default. How can you change it so that it doesn't fade in automatically (aka you'd need to set an autorun event on that map to fade the screen in.)
Idea is to be able to initialize things, and then fade in. Right now, I just have it so that new game takes you to a blank screen, with the player starting without a charaset. Then I hide the screen, do whatever I need to do, transfer the player to a new map, then fade the screen in. It's a decent enough work-around, but I'd really like to do it the 'proper' way.
I'd prefer that way, it's not really a bad thing IMHO.
heya all im still very new to this proggram so im just trying to grasp details behind this and have a little fun in the process.. well my problem is everytime i try set upa changing class system with a person you talk to it runs through then crashes due to a error on the script line but cant seem to quiet figure out what it might be any helps apperciated.
#-------------------------------------------------------------------------- # ● Change Exp #-------------------------------------------------------------------------- alias mog_damage_popup_change_exp change_exp def change_exp(exp, show) n_exp = self.exp mog_damage_popup_change_exp(exp, show) c_exp = n_exp - self.exp @damage.push([c_exp.abs,"Exp"]) if can_popup_exp?(exp) end thats wat making it seem to crash
I guess the script support goes for that? Anyways, I have another question. So I now know how to check if an actor has a note tag this and that. Now I have another question, is there a way to detect what skills are being used by the actor right after they selected their turn? I have for example:
Eric - Strong Attack
Ernest - Slow Drain
So, is there a way to check if Eric chooses strong attack and Ernest slow drain? And if so, how can I cancel them and perform a forced action instead?