Word wrapping on "Libra" skill

billx94

Veteran
Veteran
Joined
Mar 31, 2016
Messages
85
Reaction score
2
First Language
English
Primarily Uses
Hey all,

I'm having trouble with word wrapping on a "Libra" skill.

Below is the info I put into the "notes" section and a screen shot of what goes wrong.

Any help is greatly appreciated!

Libra word wrap.png

<Before Eval>

if (target.isEnemy()) {

var id = target._enemyId;

$gameSystem.addHpGaugeEnemy(id);



var text = target.name() + '\n';

text += '\\px[80]\\c[4]HP:\\c[0] ' + target.hp;

text += '/' + target.mhp;

text += '\\px[350]\\c[4]MP:\\c[0] ' + target.mp;

text += '/' + target.mmp;

text += '\\px[580]\\c[4]TP:\\c[0] ' + target.tp;

text += '\n';

text += '\\px[80]\\c[4]ATK:\\c[0] ' + target.atk;

text += '\\px[350]\\c[4]MAT:\\c[0] ' + target.mat;

text += '\\px[580]\\c[4]AGI:\\c[0] ' + target.agi;

text += '\n';

text += '\\px[80]\\c[4]DEF:\\c[0] ' + target.def;

text += '\\px[350]\\c[4]MDF:\\c[0] ' + target.mdf;

text += '\\px[580]\\c[4]LUK:\\c[0] ' + target.luk;

$gameMessage.add(text);



var weakness = '';

var resist = '';

var elements = $dataSystem.elements;

for (var i = 1; i < elements.length; ++i) {

var name = elements;

var rate = target.elementRate(i);

if (rate > 1) {

weakness += name + ' ';

} else if (rate < 1) {

resist += name + ' ';

}

}

if (weakness === '') weakness = 'None';

if (resist === '') resist = 'None';

weakness = '\\c[4]Weakness:\\c[0] ' + weakness + '\n';

resist = '\\c[4]Resist:\\c[0] ' + resist + '\n' + '\\n';

text = weakness + resist + resist;

$gameMessage.add(text);

}

</Before Eval>
 

Latest Threads

Latest Posts

Latest Profile Posts

Just dropped the trailer! Link to download and play is in the description!

Showcasing Plugins that Record Video, and Take Screenshots. :LZScheeze:


Here is the second song of the Eniko: Ghosts Of Grace soundtrack: Jus Ad Bellum (Battle Theme), composed by Nickolas Wolfe! Looking forward to your reactions!

Forum statistics

Threads
108,928
Messages
1,040,688
Members
141,392
Latest member
lalulu
Top