Hello, I am working on a small formula to provide one random character in the party a chance to assist the attack with whoever started the assault and should only work on a basic attack. It appears working sorta but everyone in the party is getting a roll where I need it to stop with the first character that clears the successRate.
Ideally it should..
Pick a random member that's not the initial attacker.
Run them vs the success chance.
If clears move to the next phase and perform X action.
Clean up and don't check any more characters.
If doesn't clear move to check another character until success or out of characters.
Also, is there a guide that has all the terms to talk to MV?
So far...
if (this.isAttack()) {
var successRate = 0.50;
var whoAttacks = Math.randInt (1, $gameParty.members().length - 1);
if (Math.random() < successRate) {
$gameParty.members()[whoAttacks].forceAction(51, -1);
BattleManager.forceAction($gameParty.members()[whoAttacks]);
}
}
This is a roadblock thats had me stuck for the last 4 days.
Any thoughts on this madness? I know I am missing things but what are they. ><
Ideally it should..
Pick a random member that's not the initial attacker.
Run them vs the success chance.
If clears move to the next phase and perform X action.
Clean up and don't check any more characters.
If doesn't clear move to check another character until success or out of characters.
Also, is there a guide that has all the terms to talk to MV?
So far...
if (this.isAttack()) {
var successRate = 0.50;
var whoAttacks = Math.randInt (1, $gameParty.members().length - 1);
if (Math.random() < successRate) {
$gameParty.members()[whoAttacks].forceAction(51, -1);
BattleManager.forceAction($gameParty.members()[whoAttacks]);
}
}
This is a roadblock thats had me stuck for the last 4 days.
Any thoughts on this madness? I know I am missing things but what are they. ><