Creating a skill based on Current TP

Status
Not open for further replies.

Emptypalms

Villager
Member
Joined
Jun 27, 2013
Messages
8
Reaction score
0
First Language
English
Primarily Uses
Hello. I'm trying to create a skill that will deal additional damage based on the current amount of TP and then remove all TP. However, it seems that when I try to remove current TP, it will cause the skill to say NULL when attacking an enemy.

I used this formula in the Damage formula box:

(a.atk*(a.tp/20).to_i)+a.atk*5-b.def*2;a.tp -= a.tp

 

I'm sure some characters are not necessary, but I'm still a novice.  :)

 

I removed the ending part [a.tp -= a.tp] and it seems to work, but now it doesn't remove any TP (initial cost is 0 so that it can be used at different TP values).

 

Can anyone explain to me a way that I can accomplish this? Or possibly my formula is not correct.
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
797
Reaction score
350
First Language
English
Primarily Uses
N/A
try this:

c = (a.atk*(a.tp/20).to_i)+a.atk*5-b.def*2; a.tp = 0; c

The actual damage part of the formula must be at the end.
 

Emptypalms

Villager
Member
Joined
Jun 27, 2013
Messages
8
Reaction score
0
First Language
English
Primarily Uses
try this:

c = (a.atk*(a.tp/20).to_i)+a.atk*5-b.def*2; a.tp = 0; c

The actual damage part of the formula must be at the end.
Thanks! This seems to be working as intended now.  ;)

EDIT: Thread may close.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

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