Need help making a certain skill

MHRob

Card Master
Veteran
Joined
Jun 30, 2014
Messages
133
Reaction score
24
First Language
English
Primarily Uses
RMVXA
Hello. I've been tinkering with this skill idea for a while and am not sure if it's possible just using the damage formula or a script. It would be nice if I could use a damage formula but if there's a script that can help with this, I'm all ears.


Alright, so it's basically this -


Skill: Banish


Effect: If the targeted enemy has 5 hp or less, inflict the death state. Otherwise, it does nothing.


How do I go about making a skill like this? I'm not looking for percents. I use numbers that are pretty low to begin with. Just need to figure out how to get this to work. Help is greatly appreciated.


(I apologize if I posted this in the wrong section)
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
Try something like this:


If b.hp < 6; b.add_state(1); else; 0; end;


I made the check as: does the enemy have less than 6HP, so that gives you your 5 or less HP
 
Last edited by a moderator:

MHRob

Card Master
Veteran
Joined
Jun 30, 2014
Messages
133
Reaction score
24
First Language
English
Primarily Uses
RMVXA
Doesn't seem to be working. Keeps giving me errors. I'm gonna try to see if I can mess around with it by removing some stuff.


Edit: Tried messing with that formula for a bit, still error after error. I may need something else.
 
Last edited by a moderator:

Vito The Boss

Someone better than you, or will become
Veteran
Joined
Nov 1, 2016
Messages
175
Reaction score
64
First Language
Italiano
Primarily Uses
Edit: Tried messing with that formula for a bit, still error after error. I may need something else.
That isn't a formula, is a notetag
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@Vito The Boss It is not a note tag, it is a formula for using in the damage formula box.  I fail to see how it could possibly function as a note tag.


@MHRob what errors are you getting?
 

MHRob

Card Master
Veteran
Joined
Jun 30, 2014
Messages
133
Reaction score
24
First Language
English
Primarily Uses
RMVXA
I've attached some images to this post. I've tried messing with the formula that was given, shortening it everytime it gave an error. Eventually it got to the point where it was doing 0 dmg in battle and not doing anything that was in the damage formula. I'm starting to believe I may need a script for this.  ._.

2.png

1.png
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
No need for a script, it's a question of just getting the syntax correct for the damage formula.  My problem is that I'm not on a machine where I can test this.  However, try:


If b.hp < 6; b.add_state(1); end; 0


I think it was just the presence of the 'else' that was the issue.  That zero at  end is the damage formula.  So it should run as either death state inflicted or no damage.
 

MHRob

Card Master
Veteran
Joined
Jun 30, 2014
Messages
133
Reaction score
24
First Language
English
Primarily Uses
RMVXA
Similar error to the one in my last post. I think it just doesn't seem to recognize "If b.hp < 6". I've tried messing around with just that bit in the damage formula with different enemies in battle with different hp and just nothing.

3.png
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
b.hp is certainly recognized in a damage formula because I have used it in several ways.


Try omitting the spaces in the first part so that it reads:


If b.hp<6; b.add_state(1); end; 0
 

MHRob

Card Master
Veteran
Joined
Jun 30, 2014
Messages
133
Reaction score
24
First Language
English
Primarily Uses
RMVXA
Similiar errors again. I feel like were missing something important in the formula. Thanks for the suggestions thus far.


EDIT: No Idea why, but this formula worked for me.


If b.hp <= 5? b.add_state(1): 0


Works just how I want it, though it's a bit different than the one you posted, Kes. Can't wrap my head around it but I'm grateful to have found something that works. Thanks for giving me insight on it.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
Yep, I forgot the ? and did ; instead.  


It's worth persevering with these formulas because they are a very powerful tool.


Glad it's working for you now.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,975
Members
137,563
Latest member
cexojow
Top