Hello I am currently trying scripting out and am curious on how to make self-variables, similar to self-switches where it only effects one event, and how to change the Event Image without having to switch event pages. Any help would be greatly appreciated. I have spent the past week or so watching youtube videos on java scripting and have been scanning RPGmaker's .js files to see if I can find the coding to change to do that. xD But I am confused.
Self-Variable and Event Image change?
● ARCHIVED · READ-ONLY
-
-
You need a plugin to use self variables. This one will work:
http://yanfly.moe/2016/08/06/yep-113-self-switches-variables-rpg-maker-mv/
You can switch graphic on any event in the move route commands :) -
You need a plugin to use self variables. This one will work:
http://yanfly.moe/2016/08/06/yep-113-self-switches-variables-rpg-maker-mv/
You can switch graphic on any event in the move route commands :)
Thanks for the link! The problem with the Move Route command though is that it doesn't remember the picture it changed to when you move off-screen. I am trying to make a farming system so it needs to remember which crop it is. I was hoping there was a simple line of script I can put into the event to change the Image but I'm not sure what exact commands it requires. -
Thanks for the link! The problem with the Move Route command though is that it doesn't remember the picture it changed to when you move off-screen. I am trying to make a farming system so it needs to remember which crop it is. I was hoping there was a simple line of script I can put into the event to change the Image but I'm not sure what exact commands it requires.
Well yeah that is going to be harder. That is the exact thing that switches are for anyway so why not just use switches? -
I'm not quite sure what you mean. What I am trying to do is have the page read conditional branch for the new self-variables you linked me. Basically I want it to read If self var "Turnip" is 1, show image "Turnip.Seed" and then when self var "Turnip" is 2, show image Turnip.Leaf. Or something like that. But for every event to be able to change no matter what crop the player wants to plant there.Well yeah that is going to be harder. That is the exact thing that switches are for anyway so why not just use switches?
-
You'll probably want to get a plugin that's designed to do this kind of thing. I believe that Galv has one called Simple Crops. There are likely others out there too.
-
I checked that out already and unfortunately it doesn't do what I need it to, but I'll see if I can change it somehow to work with what I need now that I know a little about javascriptYou'll probably want to get a plugin that's designed to do this kind of thing. I believe that Galv has one called Simple Crops. There are likely others out there too.
-
I'm not quite sure what you mean. What I am trying to do is have the page read conditional branch for the new self-variables you linked me. Basically I want it to read If self var "Turnip" is 1, show image "Turnip.Seed" and then when self var "Turnip" is 2, show image Turnip.Leaf. Or something like that. But for every event to be able to change no matter what crop the player wants to plant there.
If you do that every time the player enters the map, everything should work the way you want -
Yeah but there wasn't a code for it but I think after messing around with the code a bit from RPG Maker's original Js files and putting into a script I've gotten it to work kind of, but now its a little buggy xD But I'm working on that. Thanks for the help though as Yanfly's plugin has made this much easier!If you do that every time the player enters the map, everything should work the way you want