Changing a variable value in-game

RPGlover2

Veteran
Veteran
Joined
Nov 6, 2018
Messages
45
Reaction score
4
First Language
Italiano
Primarily Uses
RMMV
Hi everyone,
can you please explain me how to change while playing the value of a variable of a plugin like this:
var numberOne
is it possible?
 

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
860
Reaction score
2,017
First Language
Not English
Primarily Uses
RMMV
Variable values can be changed through events though, which is in-game... Sorta confused by your question. You mentioned plugins. Plugin params can't be changed in-game unless there's some sort of script call / plugin command that allows it.
 

RPGlover2

Veteran
Veteran
Joined
Nov 6, 2018
Messages
45
Reaction score
4
First Language
Italiano
Primarily Uses
RMMV
Variable values can be changed through events though, which is in-game... Sorta confused by your question. You mentioned plugins. Plugin params can't be changed in-game unless there's some sort of script call / plugin command that allows it.
1597422145175.png
If I open a plugin there are a lot of variables like these two that aren't game variables ($gameVariables). Can these variables be changed in-game? Sorry if I'm not clear when I write in english
 

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
860
Reaction score
2,017
First Language
Not English
Primarily Uses
RMMV
No, they can't be changed in-game. Does this plugin have script calls for that? Anyways, you can make a function in the plugin that can be called from within the game to change the values.
 

RPGlover2

Veteran
Veteran
Joined
Nov 6, 2018
Messages
45
Reaction score
4
First Language
Italiano
Primarily Uses
RMMV
No, they can't be changed in-game. Does this plugin have script calls for that? Anyways, you can make a function in the plugin that can be called from within the game to change the values.
Thank you for the answer, I will show you my problem. I'm using the Qcamera plugin and in parameters there is a "shift" option that shifts the camera for a number of pixel that you can decide. Unfortunately there isn't any plugin command to do it in-game (and this is what I want to do). I'm learning a bit of javascript but I don't know how to do it, can you please explain it to me? Thank you a lot
 

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
860
Reaction score
2,017
First Language
Not English
Primarily Uses
RMMV
Sorry I can't quite code :( Not yet, at least. This looked fairly easy at first. I made it so that there's a plugin parameter where you can enter a variable Id and just change the value of that variable in-game to change the shift. But it changed the center for the camera permanently. You'll have to rely on an experienced scripter for this. Let's hope someone sees this thread and decides to help.
 

ATT_Turan

Veteran
Veteran
Joined
Jul 2, 2014
Messages
89
Reaction score
39
First Language
English
Both the QCamera and the Camera Core from SmRndmDde have plugin commands to shift the camera a number of map tiles in any direction...I don't know of one that has a plugin command to adjust the camera by mere pixels.
 

RPGlover2

Veteran
Veteran
Joined
Nov 6, 2018
Messages
45
Reaction score
4
First Language
Italiano
Primarily Uses
RMMV
Sorry I can't quite code :( Not yet, at least. This looked fairly easy at first. I made it so that there's a plugin parameter where you can enter a variable Id and just change the value of that variable in-game to change the shift. But it changed the center for the camera permanently. You'll have to rely on an experienced scripter for this. Let's hope someone sees this thread and decides to help.
Yes, I want to change it permanently! Can you please show me the code? Thanks

Both the QCamera and the Camera Core from SmRndmDde have plugin commands to shift the camera a number of map tiles in any direction...I don't know of one that has a plugin command to adjust the camera by mere pixels.
I see but they shift the camera without changing tha camera center while the player is moving, this is the problem...
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,969
Reaction score
13,603
First Language
English
Primarily Uses
RMMV
Please post a link to the plugin so we can take a look ourselves.
 
Last edited:

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,651
Reaction score
5,168
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,633
Reaction score
905
First Language
Dutch
Primarily Uses
RMMV
those variables cant be changed directly unless you modified it.
those variables are mostly to create the scene, remove those, and it will break the plugin.
you need to know what your doing.

sometimes you can manupulate its functions: for example:
gamePlayer.prototype.switches = function(id, stat)

remember this isn't a real function, but you can use than,
gamePlayer.switches(id, stat) id of switch, true/false for example.

just remember this is NOT always possible depending how the plugin is written.
use teh params, or use the ingame camera to shift if you want too., which is
easier to manipulate than a plugin if you want to shift it.
 

ATT_Turan

Veteran
Veteran
Joined
Jul 2, 2014
Messages
89
Reaction score
39
First Language
English
I see but they shift the camera without changing tha camera center while the player is moving, this is the problem...
I'm sorry, I don't understand what you're trying to achieve. Are you trying to lock the camera, so it doesn't move while the player walks around? If yes, the Camera Core achieves that with its FocusCamera command - you focus the camera on a specified point on the screen, and it will stay there.

If that's not what you mean, then I just don't understand you - please try saying it another way.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Dev stream today, come on by and ask questions about rpg maker!
Fun fact: If your story introduces a variety of different races, the "human race" will automatically become the most corrupt race in general.
Finally finished my late start entry for the jam. Now. I. Sleep.
Just made 3 easy, simple and small MZ plugins today(12 hours straight), and I never thought I could ever do this.
Now I feel myself being very productive, even though I know I'm just utterly flattering myself lol
Mind: "I have cool ideas! Let's make it real!

Body: "You wanna make sumthin? I'm in."

Eyes: "Go to sleep, go to sleep."

*Sleep*

Forum statistics

Threads
104,646
Messages
1,007,812
Members
136,132
Latest member
A87
Top