Angelwilly

Villager
Member
Joined
Oct 25, 2017
Messages
11
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hi there,

I am confused how to make condition which applies effect(DMG boost) only if character is dual wielding

Example i would want to have:

1-Character has equipped 1 Sword = his basic attack + attack from weapon - THIS IS NORMAL STAT IN GAME
2- Character has equipped 2nd Sword into 2nd weapon slot (dual wield) = his basic attack + attack from weapon 1 + attack from weapon 2 + BONUS EFFECT 20% dmg

I dont see any variable which would check if character has number of EQUIPPED items, only variables to check if Weapon is in inventory and thats useless.

Could you help me please? :)
Is it possible to do this without any scripts? If there is script which one and what exactly should i use?

Thanks :)
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
711
Reaction score
229
First Language
English
Primarily Uses
In the damage formula for the attack skill try this:
a.isDualWield() ? (a.atk * 4 - b.def *2) * 1.2 : a.atk * 4 - b.def *2;
This says if the user of this skill is dual weilding then take the damage that they are doing and increase it by 20%, else deal regular damage.
 

Angelwilly

Villager
Member
Joined
Oct 25, 2017
Messages
11
Reaction score
0
First Language
English
Primarily Uses
RMMV
Zarsla that formula looks fine just one small aspect i need to add. Is it possible to add another condition to this?
Right now its If user is dual wield dmg +20% but problem is that i need to have this DMG boost only if user using Two swords, otherwise this bonus is applied even to unarmed hero who has DualWield type slot.
Is there some option how to add another Condition to damage formula that Type of weapon = Swords?

Thanks :)
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
711
Reaction score
229
First Language
English
Primarily Uses
a.isDualWield() && a.equips()[0].isWtypeEquipped(x) && a.equips()[1].isWtypeEquipped(x) ? (a.atk * 4 - b.def *2) * 1.2 : a.atk * 4 - b.def *2;
just replace x with the weapon type id.
So if swords where id 1 you'd replace x, with 1. If it was id 100, then x was 100.
 

Latest Threads

Latest Profile Posts

I am playing Momodora today and OMG this game is hard! o.o
Really happy to see people from Brazil doing an amazing game :3
Just noticed... I'm now called a Veteran not just Member...
Effervesce Fallacy™ - PV - C'est La Vie, for the best viewing experience, run the EXE, and adjust the audio via Options. The footsteps sounds are once again, barely audible. :frown: The PV only sounds as intended, if BGM Volume is set to 20%, or 40%, depending on your audio hardware.

Stream will be live shortly with some Gex 3! Tonight, I get revenge on the Buccaneer Program! Feel free to drop by!
-Updated- Lowered fog / found more problems :kaoswt2:

Forum statistics

Threads
109,214
Messages
1,043,114
Members
141,729
Latest member
dastar
Top