Syntax for switches in the damage formula

Whirlnado

Villager
Member
Joined
Feb 10, 2018
Messages
16
Reaction score
1
First Language
German
Primarily Uses
RMMV
So i want to make a skill that halves the current HP of an enemy.
However this would be extremly overpowerd in a bossfight, so the formula will check if the battle is a bossfight

I've created a switch that is on when the party is facing a boss
But the formula i've come up with doesn't work

$gameSwitches.value(9) ? a.atk * 2 - b.def : b.hp \ 2

When looking in the console it says there is a syntax error
Any ideas what to write instead?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,602
Reaction score
1,933
First Language
English
Primarily Uses
RMMV
Try
Code:
$gameSwitches.value(9) === true
for your condition instead.
 

Whirlnado

Villager
Member
Joined
Feb 10, 2018
Messages
16
Reaction score
1
First Language
German
Primarily Uses
RMMV
How exactly?^^'
Tried it like this, but that also doesn't work

$gameSwitches.value(9) === true ? a.atk * 2 - b.def : b.hp \ 2
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,602
Reaction score
1,933
First Language
English
Primarily Uses
RMMV
You've used the wrong slash for your division. Should be b.hp / 2
 

Whirlnado

Villager
Member
Joined
Feb 10, 2018
Messages
16
Reaction score
1
First Language
German
Primarily Uses
RMMV
Thanks now it works :)
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,602
Reaction score
1,933
First Language
English
Primarily Uses
RMMV
Just verified as well that just $gameSwitches.value(9) is fine, you don't need the === true
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

12 done, 4-5 started. Now that the weekend is over, things will sloooowwwww down again proabably.
when you're completely done with someone's crap lol...
Ami
--- Survival For RPGist Part 3 ---

F.Healer: Here it is,I made the Simple Sandwich
Survivalist
: it's so Delicious!
Chef: Here you Go! My Gourmet Steak.
Survivalist: It's Super Delicious,Too!
F.Mage: I Made it for you!
F.Healer: Uhh...Charcoal?
F.Mage No,It's a Toast!
Chef: Did you Let it in 10 Minutes?
F.Mage: Maybe?

Forum statistics

Threads
103,033
Messages
996,812
Members
134,507
Latest member
juegostudios
Top