Your syntax is wrong. You put semicolons after code statements (optionally, but recommended). You cannot put them after a conditional. So the correct syntax is:<JS Learn Show>
if (this.NParamId(1) > 1);
visible = true
</JS Learn Show>
if (condition)
statement;
<JS Learn Show>
visible=this.NParamId(1)>1;
</JS Learn Show>
this
is not referring to the actor. According to the Skill Learn System documentation, you should use user
to refer to the actor. Therefore:<JS Learn Show>
visible=user.NParamId(1)>1;
</JS Learn Show>
I see you figured out your error. Brackets are the bane of the best of us.Hello there. For the Visustella Menu Core, I'm trying to implement a menu item that has a show condition based on a switch being ON. In the JS: Show text box I have:
if ($gameSwitches.value[817] == true){
return true;
} else {
return false;
}
It's always returning false, even with the switch on. This would work in basic JS, but why it's not working is beyond my skill level at the moment.
Edit: $gamesSwitches.value(817) not [817]. Nothing to see here, please move along -_-'
What have you tried so far?It's me again. I'm trying to calculate the evasion rate based on Agility and I figure the most painless way to do it is with an XPARAM Plus notetag in Classes. I tried but user.agi doesn't seem to work so I can't even do any calculation.
What have you tried so far?
try using this.agi instead of user.agi<JS EVA Plus: (user.agi+1) / 8 * 0.01>
I've tried with a simple number just to check if it was a bug somewhere, but it works. So it has to be that it's not finding the agility param.
It works! Thanks a ton.try using this.agi instead of user.agi
Probably the most useful thing of MV's Yanfly Engine was his 'Tips and Tricks' where it was shown how to actually execute iconic RPG spells/actions. It gave a reference on how to use most of the notetags. This is sorely missing from Visustella.
Can someone show how to implement the simple Freeze? It's so common in RPGs that VS used it as an example in their State Effects. Yet, there's no example of how to actually implement it. Is <Custom Respond Effect> replaced with <JS Pre-Damage>?
<JS Post-Damage As Target>
const fire = 2;
if (this.isPhysical() && value > 0) {
target.setHp(0);
} else if (this.item().damage.elementId === fire) {
target.removeState(state.id);
}
</JS Post-Damage As Target>
JavaScript:<JS Post-Damage As Target> const fire = 2; if (this.isPhysical() && value > 0) { target.setHp(0); } else if (this.item().damage.elementId === fire) { target.removeState(state.id); } </JS Post-Damage As Target>