How can I make this code now work in rpg maker mv? $gamePlayer.characterIndex = 1 ?

astracat111

Astra Cat
Veteran
Joined
Jun 16, 2015
Messages
207
Reaction score
117
First Language
English
Primarily Uses
Hello there again,

I had this code that used to work in rpg maker vx ace:

$game_player.character_index = 1Now I'm trying this:

if ($gamePlayer.isDashing()){ $gamePlayer.characterIndex = 1;}But I'm not sure how to work with character index to change it properly to 1...I feel like the code should work, but it gives me back ....

Wow nvm right when I typed it out I solved the problem, I've been cracking away at it for a couple hours. After pressing F8 and debugging the values I realized you have to put an underscore under characterIndex like:

if ($gamePlayer.isDashing()) { $gamePlayer._characterIndex = 1; } else if (!$gamePlayer.isDashing()) { $gamePlayer._characterIndex = 0; }Thanks this works now. I'm still posting the topic for reference (google search for people who are clueless like I was) but mods please lock it if you want.
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,047
Members
137,569
Latest member
Shtelsky
Top