RMMV How could I make this Eval work?

STARFALL

STARFALL
Veteran
Joined
Jul 6, 2020
Messages
67
Reaction score
9
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
146
Reaction score
252
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
67
Reaction score
9
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
146
Reaction score
252
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
67
Reaction score
9
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

Hello humans! How goes your day in this journey of living? I hope it is good, for I am human like you, and I am feeling great! Worship the altar.
Sand is basically small rocks
Realizing my earlier maps are an abomination against all things, I'm doing a bit of a remake. Tell me if you can see the difference. :LZSwink:



And the horrific before pics...

Last part of OcRam Obfuscator sneek peaks!

Forum statistics

Threads
105,602
Messages
1,014,935
Members
137,273
Latest member
Magnostyle
Top