Need help to change Characher image based on a variable

Martin

Veteran
Veteran
Joined
Apr 8, 2015
Messages
163
Reaction score
34
First Language
swe
Primarily Uses
RMMV
I have objects on a separate map and I transfer them to new scene where they are needed.


As I have progressed with the game I have added a new snow area. And I was wondering If anyone here could help me solve this.


I have trees.png, elements.png, rocks.png character set. From them I created 16 complicated events with all selfswitch used up.


And now I made three more images (copy and add snow) trees_snow.png, elements_snow.png, rocks_snow.png


Question: Is It possible to change/swap eventimage with a variable so when I enter the snowy area, all the items gets snow on them (trees_snow.png, elements_snow.png, rocks_snow.png)
 

Dad3353

Veteran
Veteran
Joined
Mar 9, 2016
Messages
421
Reaction score
108
First Language
English
Primarily Uses
Events respond to Self-Switches, but also to ordinary Switches, or combinations of both. A rock could have, for instance, a Self-Switch 'A' page, with a summer Tile, and a Self-Switch 'A' + 'Winter' Switch, with a snow Tile. Turning On the Winter Switch would give the rock snow.


Any help..?
 

Martin

Veteran
Veteran
Joined
Apr 8, 2015
Messages
163
Reaction score
34
First Language
swe
Primarily Uses
RMMV
I was hoping for a better solution. Then I have to copy paste every single page in every event and add the switch. I hope maybe there is a way to change the image my events are looking for
 

Dad3353

Veteran
Veteran
Joined
Mar 9, 2016
Messages
421
Reaction score
108
First Language
English
Primarily Uses
It's also possible to switch Tilesets, but that can be delicate.
 

Pine Towers

Knight Hospitaller
Veteran
Joined
Nov 11, 2015
Messages
466
Reaction score
223
First Language
Portuguese
Primarily Uses
RMMV
Run a parallel process that check the variable and change the position of the events, so facing up = summer, down = winter, left = autumn, right = spring. Lock the facing direction to prevent the player to change seasons by interacting with the event.
 

Martin

Veteran
Veteran
Joined
Apr 8, 2015
Messages
163
Reaction score
34
First Language
swe
Primarily Uses
RMMV
That was not a bad idea. PineTowers.  Thanks

I still have to make all the events again, from scratch making the sprites with this in mind.


Maybe there is a script to just replace rocks.png with rocks_snow.png so that the selected events reads the snow image instead of the one i set them up with?
 

Pine Towers

Knight Hospitaller
Veteran
Joined
Nov 11, 2015
Messages
466
Reaction score
223
First Language
Portuguese
Primarily Uses
RMMV
You could use the parallel event to "Change Graphic" instead of "Facing" the event. Using a whole new spritesheet in several events could hinder your FPS alongside increase of of the game data/megabyte.


Good luck, but remember: To work on your project you need to... work. Sometimes it won't be fun to do, but only after you do and see the final result.
 

Martin

Veteran
Veteran
Joined
Apr 8, 2015
Messages
163
Reaction score
34
First Language
swe
Primarily Uses
RMMV
I started with your plan PineTowers but another issue is hindering me. Im using OrangeCustomEvents so my rocks are copied from another map.
I tried also to copy the event that commands it to turn left but if wont turn left because of they are copied to another map and dont know what they are doing to eachother anymore.


I was hoping for a script something like this,


So that the engine just swaps the picture it gets/refers to from the characters folder.


$gameSprites.rocks01(1), "change to" $gameSprites.rocks02(1);




Anyways, I had to make the rocks with snow to test. Might just trow it here since it's on topic.
 

!newRocks.png
 

Warboss74

Villager
Member
Joined
May 20, 2015
Messages
24
Reaction score
13
First Language
English
Primarily Uses
Have you tried Yanfly's self switch/self variable plugin? It extends the number of self switches available, but also adds a self variable to manipulate in your events.
 

Martin

Veteran
Veteran
Joined
Apr 8, 2015
Messages
163
Reaction score
34
First Language
swe
Primarily Uses
RMMV
Please explain, Warboss74, How would you then set it up?
 

vectorinox

Airport Luggage
Veteran
Joined
Jun 20, 2016
Messages
45
Reaction score
9
First Language
Singlish
Primarily Uses
Hey, I had this problem before. Solved it with Hime's self-variable and custom page condition. Run a parallel event on the first page to determine what graphic should your event use based on variable, then activate the switch for the next page followed by *set move route -> this event ->  change image*, If you run it in a correct order, the image should persist for the next event page.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I'm play DQ:XI DE in 2d mode with the synthesized soundtrack, the only way a RPGMAKER creator should play it. :D
:/ it really get on my nerves reading stuff about how to write a resume and they say things like "turn your failures into wins!!!" ... no interview Ive ever had cared to hear anything about my failures, and why would they :( ?
"Huh? You haven't backed up yet? *menacing stare* "
Been having a lot of fun playing Hearts of Iron IV. Had to restart a few times, but now I've finally conquerd Europe with my Axis friends, and am currently invading the Soviet Union.
Guess I'll rework all the existing screens in my game. Except of the save/battle screen. For this I will be lazy and use Yanfly. With my current pace it'll take a few months.

Forum statistics

Threads
93,632
Messages
914,144
Members
123,221
Latest member
Luspeon
Top