RMMV How could I make this Eval work?

STARFALL

STARFALL
Veteran
Joined
Jul 6, 2020
Messages
126
Reaction score
17
First Language
spanish
Primarily Uses
RMMV
I explain, I made 3 skills that call the same common event that I should do the following:
if skill A was used, set variable X to 0, if not, variable X increased by one
and try the following:

if ( the skill used is == Skill A){
$game.Variables.setValue(x,0));
}
else {
$game.Variables.setValue(x,$game.Variables.value(x,++));
}

but I don't know how to complete it, the truth is that I don't know if what I did is right.
Could someone help me, Thanks in advance.
 

Cythera

Veteran
Veteran
Joined
Jul 31, 2019
Messages
150
Reaction score
266
First Language
English
Primarily Uses
RMMV
If they're three different skills, why don't you control the variable in each skill using Action Sequence commands? :3 Or even a skill after eval.
Or are you trying to do something else in the common event in addition to the variable control?
 

STARFALL

STARFALL
Veteran
Joined
Jul 6, 2020
Messages
126
Reaction score
17
First Language
spanish
Primarily Uses
RMMV
If they're three different skills, why don't you control the variable in each skill using Action Sequence commands? :3 Or even a skill after eval.
Or are you trying to do something else in the common event in addition to the variable control?
you're right it's easier that way. but I would be interested in learning how to do it with js. I am trying to learn but it is not easy.
 

Cythera

Veteran
Veteran
Joined
Jul 31, 2019
Messages
150
Reaction score
266
First Language
English
Primarily Uses
RMMV
If you don't want to do it via action sequences, I'd go with the skill core plugin - another freebie of Yanfly's. Then do an after eval on each of the skills; it would look something like:
<After eval>
$gameVariables.setvalue(1, $gameVariables.value(1) + 1);
</After eval>
But I say just use action sequences :p It's the easiest route! Don't add more work for yourself is my opinion haha.
Also, side note here, if you're interested in learning to code with MV, I use this site - it has documentation for...pretty much everything in the engine. I find it super useful.
 

STARFALL

STARFALL
Veteran
Joined
Jul 6, 2020
Messages
126
Reaction score
17
First Language
spanish
Primarily Uses
RMMV
If you don't want to do it via action sequences, I'd go with the skill core plugin - another freebie of Yanfly's. Then do an after eval on each of the skills; it would look something like:
<After eval>
$gameVariables.setvalue(1, $gameVariables.value(1) + 1);
</After eval>
But I say just use action sequences :p It's the easiest route! Don't add more work for yourself is my opinion haha.
Also, side note here, if you're interested in learning to code with MV, I use this site - it has documentation for...pretty much everything in the engine. I find it super useful.
Okay, I'll use <ACTION SEQUENCES>, in the end the result will be the same and it's easier, and thank you very much for the link.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

A part of me wants to return back to the beginning and first two chapters and remake them with parallax map. But I have decided not to. Every chapter is just another step in the journey. No need to walk back unless I have to revise dialouge.
Hey guys! Good news!
I just released the Games from Brazil - Part 2 on my Youtube Channel! I am really happy that part 1 had 100 views and I hope more people will be interested to see the potencial of Brazilian Game Devs!
Effervesce Fallacy™ - Attract Mode (proto)

Forum statistics

Threads
107,570
Messages
1,030,636
Members
139,671
Latest member
WDRS
Top