Variables help

Hello everyone, having some trouble with variables.

Specifically, how to change variables in battle. I have a neat mechanic where the main character changes shape when she comes in contact with an element (plants turn her thin, rocks turn her bulky) based on the number of a variable and that changes the sprite with the change Actor sprite command.

However, I want it to change in battle. That is if she touches an elemental enemy I want the variable that decides what size the Protagonist is to change and that to continue outside of battle. 

I have tried using a skill that calls a Common event to change the variable but that doesn't seem to do anything.

Any help would be very much appreciated.
Are you using a script to change the appearance of the sprite?  If so, you need to tell us which one and provide a link to the web page where it is presented.
Are you using a script to change the appearance of the sprite?  If so, you need to tell us which one and provide a link to the web page where it is presented.
No, I haven't used any scripts, I have just used a common event that is called in certain events. The variable is a number, and depending on the number it changes the actors graphic, interacting with various events increases or decreases the variable and then runs the common event to change the actors graphic. Is there a way to cause the variable to change as a result of actions in battle and then a way to run the Change event at the end of battle?
Given that there are no actor sprites in battle by default, if you HAVE actor sprites, you must be using a script.

The Change Actor Graphic command changes the sprites on the map.
Given that there are no actor sprites in battle by default, if you HAVE actor sprites, you must be using a script.

The Change Actor Graphic command changes the sprites on the map.
Sorry.

I didn't mean that an in battle sprite would change, I meant that I could make an ability that could be used in battle that would change the Actor's Graphic on the Map when the battle was over. 

Just for my sake I'll ask this. Would it be possible to make an ability that calls a common event to change a variable when used in battle?
So show us how things are set up - your common event, your skill ...

If you set it up correctly, I believe it should work.
Okay I made some screen caps of the common events and the ability I made, and some notes explaining them.

  [IMG]http://i.imgur.com/3yBerhy.png[/IMG]
There you go.  You've got the one skill calling 3 common events.  Only one will actually run.

At the top of each of your common events, just add a Show Text command, with the name of the common event as the text.  Then do a battle test and use that skill.  I'm pretty sure you will see that only the first one will actually execute.

Combine them all into a single common event that 

1 - changes the variable

2 - restricts the value to the allowable limits

3 - changes the sprite based on the value

and have your skill call that single common event.  You should see it working properly after that.
Wow, was that really it? 

I feel so dumb, anyway thank you so much, sorry I made a meal of this.
Honestly, it's not something that's obvious. I only got it based on your screenshots because we had run into other problems previously where people had set the same feature multiple times. And I don't think this one is documented in the help file either (though I'd have to check to be sure).


So don't feel bad 🙂

Original thread: https://forums.rpgmakerweb.com/threads/variables-help.44926/