Bleeding effect when attack by a knife

NeoShima

ShimaProd.
Veteran
Joined
Apr 19, 2020
Messages
57
Reaction score
4
First Language
Russian
Primarily Uses
RMMV
I have added a knife to my game. And also I have added a "bleeding" statement. I know how to add effect to skill, but I don't know how to make this with weapons. Can you help me?
 

HumanNinjaToo

The Cheerful Pessimist
Veteran
Joined
Apr 18, 2013
Messages
1,226
Reaction score
603
First Language
English
Primarily Uses
RMMV
The script call to check a weapon ID is

$gameActors.actor(actor_id).equips()[slot_id] == null;
*change null to id

I'm not 100% sure how to reference this in a damage formula. However, without using plugins, I think you would just need a condition in the damage formula to check if the user has a dagger equipped.

So if the weapon name is 'Dagger' then you could try

a.equips()[0] == dagger ? b.addState(x); formula here : formula here

I'm not sure about the syntax though. I did a google search and I couldn't find anything specific to damage formulas, only script calls.

Here is a link to the master script call list. Under the battle section you can see script calls that reference checks for weapons and weapon types.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
@HumanNinjaToo has provided some valuable information, but you can do this effect with no coding or plugins at all:

1594073882897.png

1594073891112.png

Just add an "attack state" trait to your Dagger weapon, set the % chance you want it to have of being inflicted, and the default engine will handle the rest.
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
533
Reaction score
235
First Language
English
Primarily Uses
RMMV
a.equips()[0] == dagger ? b.addState(x); formula here : formula here
You can't put a semicolon inside a ternary operator, so this won't work. It's just a syntax error and then engine will substitute 0 every time.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,047
Members
137,569
Latest member
Shtelsky
Top