Pastel_Panda

Villager
Member
Joined
Oct 29, 2018
Messages
13
Reaction score
12
First Language
English
Primarily Uses
RMVXA
So I want to include a sort of "berserker" skill in a project. This skill does damage to all enemies, but it also inflicts confusion on the user. Problem is, I'm not quite sure how to go about doing it.

I tried adding it into the damage formula like so:

a.atk + (a.atk * 4 - b.def *2), a.add_state(7)

However when I run the test battle to see if it works, it gives me this error:

1580608664918.png

I know very little about the damage formula and how the syntax works, so I'm not sure how to go about changing this. Could anyone help me figure it out (and possibly explain it in a way that's easy for a dumb like me to understand)?
 

Lord Vectra

Master Eventer
Veteran
Joined
Dec 6, 2015
Messages
246
Reaction score
353
First Language
English
Primarily Uses
RMVXA
a.add_state(7); a.atk + (a.atk * 4 - b.def *2)

1. Use semi-colon instead.
2. The last formula in the damage formula is read as the damage calculation. The intended formula doesn't make no sense unless it was last so you confused the program (essentially lol)
 

Pastel_Panda

Villager
Member
Joined
Oct 29, 2018
Messages
13
Reaction score
12
First Language
English
Primarily Uses
RMVXA
a.add_state(7); a.atk + (a.atk * 4 - b.def *2)

1. Use semi-colon instead.
2. The last formula in the damage formula is read as the damage calculation. The intended formula doesn't make no sense unless it was last so you confused the program (essentially lol)

I ended up getting the same error when I tried changing the formula. I figured maybe it's because I had two parts to the actual damage formula (the character's attack being added to atk*4-def*2) so I took the first part out, but it still gave me the same error.

I'll also add that I have not added external scripts or edited the existing ones.

EDIT: I'm dumb and figured it out. I forgot to put a space between * and 2. Whoops. It works now, thanks!
 

Lord Vectra

Master Eventer
Veteran
Joined
Dec 6, 2015
Messages
246
Reaction score
353
First Language
English
Primarily Uses
RMVXA
I ended up getting the same error when I tried changing the formula. I figured maybe it's because I had two parts to the actual damage formula (the character's attack being added to atk*4-def*2) so I took the first part out, but it still gave me the same error.

I'll also add that I have not added external scripts or edited the existing ones.

EDIT: I'm dumb and figured it out. I forgot to put a space between * and 2. Whoops. It works now, thanks!
OOF, I hate when that happens. The last part of the formula is used as the damage calc though.
 

Latest Threads

Latest Profile Posts

Even if you made 1% progress today in your making-game, that's 100% success!
This is Ralph from VX!
index.php

Always be consistent with your project.
Making backups regularly is good for the soul.

Forum statistics

Threads
121,852
Messages
1,144,683
Members
160,109
Latest member
fia
Top