Hi guys, I need a script snipet to multiply a variable by a number.
Say for example variable x 5.
var t1 =0
var t3 = t1*t1
or var t1 = t1*5
Hey Everybody,
Unfortunately my Java Script knowledge is very poor so I was hoping somebody could help me out.
I am trying to add another element to the function below, basically I would like it to check if Physical and Melee damage is dealt for the recoil
effect to appear but I don;t know how to edit the function.
Any help would be appreciated,
thank you.
<Custom React Effect>
// Check to see if any physical damage is dealt.
if (value > 0 && this.isPhysical()) {
// Sets the Recoil Rate to 10%.
var rate = 0.10;
// Determines the amount of recoil damage dealt.
var recoil = value * rate;
// Sets the DEF bonus rate to 15%.
var rate = 0.15;
// Determines the amount of bonus damage dealt.
var bonus = target.def * rate;
// Rounds up the bonus damage and recoil damage.
var dmg = Math.ceil(bonus + recoil);
// Makes the attacker lose damage equal to the dmg variable.
user.gainHp(-1 * dmg);
// Check to see if the attacker is dead.
if (user.isDead()) {
// If the attacker is dead, make it collapse.
user.performCollapse();
}
}
</Custom React Effect>
I have a question regarding Yanfly's row formation plugin. How do you restrict the number of playable characters per row? For instance I would like to restrict the number of characters to 4 per row.
Hey, I'm trying to make an attack that deals increased damage based on the number of turns that a certain state on the target has.
Using Yanfly's Buffs and States Core, btw.
<Custom Apply Effect>
if (target.isStateAffected(11)) {
var dmg = "target.getStateCounter(11)";
}
target.loseHp(dmg * (rest of attack formula goes here));
</Custom Apply Effect>
I tried using this, but it does nothing. I know nothing of Javascript so I can't figure this out on my own, can someone lend me a hand?
Edit: Note, I'm using this code on a second state that is applied with the attack.
How can I hide an option in the options menu on the title screen but have it show in-game? Using Yanfly’s Options Core.
Actually I was able to put the shutdown command in the options core, but it’s still there while accessing options from the title screen.
Ah, it's a concrete option! OK, in that case let's do a little magic trick. There's an important if.
if (SceneManager._stack[0] != Scene_Title) this.addCommand (that shutdown command, not sure how it's handled)
wherever this shutdown command is.
Modified it a bit by removing the "if" and parenthesis. Thanks!