Default Cursor Position

donbrendo

Villager
Member
Joined
Feb 4, 2014
Messages
6
Reaction score
0
First Language
English
Primarily Uses
Hello all. I am trying to set the default cursor position for Menu Command to be something other than the first in the index (Items). I'm able to accomplish by fiddling with the "@index = index" line in Window_Selectable. Changing "index" to a number will cause the cursor to appear on the desired command, but it will be locked in that position. How can I allow the cursor to move from the new default index position? Thanks!
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
1,853
Reaction score
408
First Language
English
Primarily Uses
RMVXA
If there is a way to do this, hopefully someone will come along and advise you.
Otherwise Playing around with the windows selectable is not a good thing. What you did was tell it to go to command (number) and never move. Similarly if you set it to @index = index + 1 would cause the menu selection to skip every second command.
Another option is Window_Command. Line 16 select(0). If you set it to 3 then command 3 will always be selected first. However this will be true for any window you open. Going into items will select key items first not the default items.
 

donbrendo

Villager
Member
Joined
Feb 4, 2014
Messages
6
Reaction score
0
First Language
English
Primarily Uses
Hi Roninator, thanks for your reply and for letting me know how select() works!
So I got this to work by adding an if/else statement to "initialize" in Window_Command that checks if a certain scene (in this case, the Menu Scene) is currently open and, if so, changes "select(0)" to (5). Not sure if this is the most elegant method but it doesn't seem to have had any adverse effects on my game so it's good enough for me. In case anyone cares, this is how I set it up (lines 10-23)...

def initialize(x, y)
clear_command_list
make_command_list
super(x, y, window_width, window_height)
refresh
if SceneManager.scene_is?(Scene_Menu)
select(5)
activate
else
select(0)
activate
end
end
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

So trying our Ultra Mode 7 was a bad idea. How do I not include this in my game? XD
Stumbled upon an RPG Maker game on Steam called 'Boobs vs Zombies' while looking for a zombie themed fantasy RTS. lol
There's a new born faction in my country called "Sunda Empire" claiming they have right to rule over the earth and sun... I don't know what to feel...
Quon is watching you
Quon blessed your good efforts
I have tried, several times to understand how Markiplier is popular. You can't deny his popularity. I can only get through a few minutes of his vids, though. He's cringier than ANY cringe comp I've ever watched. When I was a kid, if you acted like that, 0 friends and 100% no dates for you. Times have changed XD

Forum statistics

Threads
93,546
Messages
913,383
Members
123,079
Latest member
plytha
Top