Status
Not open for further replies.

dwiseman57

Merchant Prince Digital
Veteran
Joined
Jun 29, 2014
Messages
70
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

Veteran
Veteran
Joined
Nov 6, 2021
Messages
276
Reaction score
142
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. ^^
 

dwiseman57

Merchant Prince Digital
Veteran
Joined
Jun 29, 2014
Messages
70
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

Veteran
Veteran
Joined
Nov 6, 2021
Messages
276
Reaction score
142
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.
 

dwiseman57

Merchant Prince Digital
Veteran
Joined
Jun 29, 2014
Messages
70
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
4,110
Reaction score
3,168
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.
 

dwiseman57

Merchant Prince Digital
Veteran
Joined
Jun 29, 2014
Messages
70
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
4,110
Reaction score
3,168
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

WhitePaper.jpg

From China, with...white paper. :kaojoy:
This is a really good video
Testing Parry/Counter system straight from Action Sequence instead of utilizing the default counter.
Quite happy with the result so far.
Bex
This just blew my mind.
RMMZ can choose Tilesize.
No complicated Plugin needed, it is a simple inbuild Option.
This means you could literally use all your rm2k3 or vx-ace Tilesets and Characktersets in RMMZ.
This also makes me curious about experimenting with smaler Tiles and higher Screen Resolutions for non RPG Games.
mztilesize1414564.png
Did you know about this?

Forum statistics

Threads
126,984
Messages
1,182,896
Members
166,840
Latest member
PeachyGlitch
Top