Ruby/RGSSx questions that don't deserve their own thread

is doing this

#==========================================================================# the comment#==========================================================================with comments a convention in ruby or just RGSS
Hello!

I'm not entirely sure if this has to do with scripting but when my players cast a spell on another character in the party the animation takes place above their head. Any way to change that? I would move the tiles in the animation down but then when the enemies use those animations they are off centre.
Which script are you using for actor battlers? Ace doesn't have battlers for actors by default and don't really show animations on actors because of that. Also what's the target type of your animations? Anyway, it might be that your enemies and actor battlers have different sizes hence resulting to the discrepancy (though I think the difference should be big to make an actual visible difference).
Which script are you using for actor battlers? Ace doesn't have battlers for actors by default and don't really show animations on actors because of that. Also what's the target type of your animations? Anyway, it might be that your enemies and actor battlers have different sizes hence resulting to the discrepancy (though I think the difference should be big to make an actual visible difference).
Wish I could have responded sooner. The website was not working for me for a while.

Anyway I found the problem and a work-around it.

Thanks 🙂
is there a short hand way to tell ruby to get a file from the game directory and load them so i can make a quick edit splash script?

also i seem to be unable to load through this, i get ether no method for each, or no method x, and the msgbox wont show when array=[]:

Spoiler
module

@splashImage = [] ** this is the current setup

* hoping for @splashImage = dir files loaded

end

  def splashResponse()
    if @splashImage != [""]
      @splashImage.each {|x| return x }
    else
      msgbox("no, splash image found going to Title")
      SceneManager.call(Scene_Title)
    end
  end
In VX Ace, how would I make the battle commands center-aligned? I'm not looking for a script, just whatever code I'd need to stick into Window_PartyCommand and Window_ActorCommand (or wherever).
@lilyWhite

You need to put this little method anywhere in the mentioned window classes:

def alignment return 1endThis assumes that you don't use any other custom script for your battle HUD.@WorldWakeSTU

You can make a folder for your splash images, than you can use this code to get all the files from the folder:

splashes = Dir.glob("FolderPath/"+"*.png")The above code would get all the files (well, their names only) from the specified folder which got '.png' extension.The "FolderPath"'s root folder is the game's main folder.

Note that this will NOT work with encrypted files! If you want to encrypt the images for your splash screens, you should just hard-code the name of them with the folder path in the array in your script.

Also, note that your array iteration in your code instantly stops at the first element.

Using 'return' means that whatever is on the same line will get returned by the method, and the method itself will not continue (regardless of any iterations), it will terminate itself.
Thanks for the folder script and also that clears up a lot about the return function
So I have a custom battle end window, and I call it in BattleManager and all that, it works fine except I don't know how to make it wait until the space bar is pressed to close.  Right now it just opens and the battle is over.

I have this to make the window appear

def self.show_exp_window SceneManager.scene.show_victory_window wait_for_message endshow_victory_window just calls .show on the window (in Scene_Battle)
You can try to add this at the end of that method:

Code:
SceneManager.scene.abs_wait(1) until Input.trigger?(:C)
You can try to add this at the end of that method:

SceneManager.scene.abs_wait(1) until Input.trigger?🙂C)
Thanks, that worked, but out of curiosity what does Input.trigger?🙂C) mean?
That's the default input check method used by VX Ace.


:C is the symbol used for the "confirm" button check (Enter, Space and Z on the keyboard by default).


Basically, that is how you check for button presses.
what do the normal ruby commands puts and print do?  I've put them in code, but nothing happens.  If there is not way to read what puts and print print than is there another simple, easy way to debug?
You must open the console to see those lines printed.


Press F1 when the game is running and you should see an option to enable the console.
You must open the console to see those lines printed.

Press F1 when the game is running and you should see an option to enable the console.
So I see some options when I press F1, but no console options.  Just Music, Fullscreen, and controls
Found out how to show the console, just go to Game -> Show Console, and the console will show up in playtests and battle tests
Oww, yeah, seems like I mixed it up with another program. Sorry about that! 😀
Oww, yeah, seems like I mixed it up with another program. Sorry about that! 😀
no problem at all!
Hello,

Is there a way to hide a Skill type in combat?

I have a Skill type called Passives and I don't want them to be present during combat.
Where would I put code that should execute when a skill is used?  Not just any skill, I have notetags on my skills and need to use their values when that skill is used.  Would it be in Game_Action?  if so where? 

Original thread: https://forums.rpgmakerweb.com/threads/ruby-rgssx-questions-that-dont-deserve-their-own-thread.150/