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

Why are you treating $game_variables as a two dimensional array?

What it's doing is taking $game_variables[41+...] and evaluating it, coming up with a number. Then it's trying to find the [$game_map...] element of that number. But numbers don't have elements, the [] is undefined for objects like 3 or 42.

That's why it's saying the method isn't defined for Fixnum.
Script 'Game_Interpreter' line 1411: NoMethodError occurred.undefined method `[]=` for 0:Fixnum? I'm guessing the answer is super simple but I'm terribly inexperienced so I'm basically just hacking together code for my specific event purposes.

Edit: Is it because the array needs to be initialized? I forgot about that :I
The issue seems to be that you're using the game variable as a two-dimensional array. However, you never set that location to be an array, and it defaults to 0. As such, there is no way for you to do what you want on 0, and you receive an error.

I also recommend using my fix for the script box error message. It'll give considerably more information regarding errors (Common Event vs Normal Event, Event ID, Script box number, and the line number for it) which can help you and other people find issues more easily with events. 🙂
I've noticed that the engine will not update an event's autonomous movement once they are a certain distance away from the player. Is there any way to keep updating a specific event's autonomous movement?
1) instead of autonomous movement, you can control their movement via a parallel process event


2) I do think you could edit the scripts so that they continue walking
1) instead of autonomous movement, you can control their movement via a parallel process event
1 - It needs to be autonomous because the event in question will have its movement disturbed at any given point in their movement path. If I use a parallel process event, it will have to finish the whole move route before it changes. I'm not looking for alternatives, just a solution to this specific problem. Thanks though~
Antilag scripts sometimes have a way to force an event to ignore the distance so they'll keep updating.  Usually by giving it a particular name, or adding a particular comment to the page.
Is there a way to change the zoom value on an animation? I have some combat events that can cause a character's sprite zoom to change, but I haven't found a way to accordingly change the size of animations played on that character.
Animations already have a zoom on each sprite of each frame. You could PROBABLY add in a multiplier so it would apply the character's zoom on top of the default zoom, but then you'd have issues of offsets (does it position the sprite based on the centre or on the top left corner?) and the potential of multiple frames/sprites of the animation not sitting together properly anymore.
Offsets aren't a problem, I have all animations centered on sprites as it is due to how I'm displaying them. I hadn't thought of adding a modifier to the frame zoom though, I'll give that a try.
zooming can cause offset problems, I've experienced it myself
Yeah, it's not just zooming the sprites that's needed, but increasing the spacing between them so the end result looks exactly like a larger version of the original.
I am working on setting up my battle system for my current project, however, I have run into a issue the Actor Command Window is covering up my UI. Is there away to edit the $Actor_Window, or whatever scene, to move or change the layout of the Command Window? 
Yes, there is a way. But the answer depends on EXACTLY what you want to achieve, and you've listed 3 different things.


Please post in a new thread (because it'll probably take a bit of back and forth to get it right), stating EXACTLY what you want to do.
Yes, there is a way. But the answer depends on EXACTLY what you want to achieve, and you've listed 3 different things.

Please post in a new thread (because it'll probably take a bit of back and forth to get it right), stating EXACTLY what you want to do.
I got it solved on another form, it was a simple answer really just needed to know what line to edit. Thanks anyways
Is there any way to make an event move faster than the highest value of 6? would it require an extra script or modification?

I've played around with $game_map.events[eventid].move_speed  and anything above 6 only speeds up the walk animation. The actual move speed seems capped at 6.
There is no cap.

Just make the @move_speed variable changeable through a writer:

class Game_CharacterBase  attr_writer     :move_speed endAnd then you can change it throug a scriptcall:

$game_map.events[eventid].move_speed = number*edit*

Also change the move freq. to the highest value for best results
There is no cap.

Just make the @move_speed variable changeable through a writer:

And then you can change it throug a scriptcall:

*edit*

Also change the move freq. to the highest value for best results
Thanks, works fine on a fresh project. Looks like one of my scripts is capping the event move speed.
Thanks, works fine on a fresh project. Looks like one of my scripts is capping the event move speed.
Possibly. Some things get 'bound' to the game after compile and aren't changeable (at least not easily) - I don't know if move speed is one of them. Add your scripts one at a time and see if it still works. If not, you'll know which one is the problem, at any rate.
@donn_m what scripts do you use?
I like working with scripts, but I sometimes need to be able to enable/disable them at will. Is there an easy way to enable/disable scripts outside of game? For example, just pasting "if true, then <script>", so I can just change it to "if false, then <script>". I need this because if I want to disable a script at will, without having to cut and paste it into an editor or something, I'd like to be able to just edit a line to disable the entire script. I'm pretty sure some scripts have this feature already, I'm just wanting to know how to edit any script to disable it.


Even if there's a way to multi-comment out the entire script easily (like documentation commenting in Java... "/* <text here> */").


If someone could answer my question they're amazing ^_^

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