Status
Not open for further replies.

MerchantLegends

Merchant Prince Digital
Regular
Joined
Jun 29, 2014
Messages
71
Reaction score
11
First Language
English
Primarily Uses
N/A
I have plugins installed, such as Yanfly Message Core (MV), which allows setting the window position of the "Show Text" event command via a text code, such as:

Code:
\px[]
\py[]

for X and Y positions.

This works great, but I want to set the position of the text window via a variable.
Of course, the following doesn't work in text codes:

Code:
\px[\v[19]]

nor does:

Code:
\px[$gameVariables.value(40)]

for obvious reasons.
Does anyone know how I can set the position of my "Show Text" command using a script or plugin command?

I'd ideally want to avoid installing any bulky plugins, as Yanfly does 99% of what I need already.
Any ideas? I've spent a good amount of time googling, but can't find anything helpful.
 

Spaske

Regular
Regular
Joined
Nov 6, 2021
Messages
276
Reaction score
144
First Language
German
Primarily Uses
RMMZ
Im sorry i could and probably am wrong since i only recently began to look further into scripting (JS to be precise) but could it be that this is the one:
$gameVariables.setValue(id)
since this one sets it, the other one asks for it... im sure im wrong but well, it doesnt hurt to try it out. ^^
 

MerchantLegends

Merchant Prince Digital
Regular
Joined
Jun 29, 2014
Messages
71
Reaction score
11
First Language
English
Primarily Uses
N/A
I'm not trying to set a variable... I'm trying to define the position of a text window.
Code:
$gameVariables.setValue(id)
is the code for setting the value of a variable.

Thanks for trying though!
 

Spaske

Regular
Regular
Joined
Nov 6, 2021
Messages
276
Reaction score
144
First Language
German
Primarily Uses
RMMZ
Oh ok, sry my mistake, thought you want to set it but now i got it, i mean i know what you want but still dont know the answer, maybe one of those help: $game_variables(x) or $gameVariables(x)
"im sure they are wrong as well tho. :D "

And i wont pull on straws any further, since this goes way over my head, im sure someone will know the right answer.
 

MerchantLegends

Merchant Prince Digital
Regular
Joined
Jun 29, 2014
Messages
71
Reaction score
11
First Language
English
Primarily Uses
N/A
Thanks for trying Spaske.

Hoping someone has an answer?
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
5,021
Reaction score
4,351
First Language
EN
Primarily Uses
RMMZ
I haven't tested, but are you certain the \px[\v[19]] thing does not work? I believe it should work, because \v[x] is replaced before the message starts, and \px[__] is replaced mid-message.
 

MerchantLegends

Merchant Prince Digital
Regular
Joined
Jun 29, 2014
Messages
71
Reaction score
11
First Language
English
Primarily Uses
N/A
Ah it does work ! Weird! I think the reason it wasn't working before was because those codes only seem to take effect if you add "MessageRows 18" so the window is bigger...

Thanks for making me check this again!

(This is solved)
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
5,021
Reaction score
4,351
First Language
EN
Primarily Uses
RMMZ
No worries! Happy RPG Making~

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

Why is it so early? Can I have twenty more minutes of sleep, please?
DK
Do you like this design?

GIF.gif
Im watching Depp vs Heard and keep thinking: "Wouldnt it be fun if her middle name was Lisa? Then she'd be Amber L. Heard. Sounds like Amber Alert."

Then I found out her middle name is Laura.
Yeaah, pallarax mapping

mTQFUv1QrOI.jpg
ScreenShot_9_26_2023_0_27_57.png
working on the house you explore in the beginning of my game. it's the first major area... part exploration, part battles. just need to script events and setup the on screen enemies.

Forum statistics

Threads
134,807
Messages
1,250,811
Members
177,603
Latest member
OceansMotion
Top