Apply Buff to Self on Hit

Status
Not open for further replies.

ajilejay

Veteran
Veteran
Joined
Jul 17, 2013
Messages
64
Reaction score
0
First Language
English
Primarily Uses
I have been having a hard time figuring out how to do this. Since when you use a attack the scope is on the enemy the buff always gets applied to the enemy. Is there anyway I can hit an enemy with a skill and have it apply a buff to myself?
 

ajilejay

Veteran
Veteran
Joined
Jul 17, 2013
Messages
64
Reaction score
0
First Language
English
Primarily Uses
Even when I try to do a recover 10 mana on hit it recovers mana for the enemy instead of the caster > <.... What am I missing!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
ajilejay, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


If you want to add something, just use the Edit button instead of double posting.


The damage formula applies, by default, to the target, not the user. If you want the user to have something happen, you have to specifically say that in the formula.


So if you want the skill to do 10 damage to the enemy AND give the user 8 mp back, you would write your formula like this:

Code:
a.mp += 8; 10
I'm not sure about adding a buff via the formula though.
 

ajilejay

Veteran
Veteran
Joined
Jul 17, 2013
Messages
64
Reaction score
0
First Language
English
Primarily Uses
my apologies been trying to figure that out for days
 

ajilejay

Veteran
Veteran
Joined
Jul 17, 2013
Messages
64
Reaction score
0
First Language
English
Primarily Uses
ajilejay, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.

If you want to add something, just use the Edit button instead of double posting.

The damage formula applies, by default, to the target, not the user. If you want the user to have something happen, you have to specifically say that in the formula.

So if you want the skill to do 10 damage to the enemy AND give the user 8 mp back, you would write your formula like this:

a.mp += 8; 10I'm not sure about adding a buff via the formula though.
Where else can I add it? When i did this it causes my attack to be = to my mana

EDIT***

Turns out the buff has to be put in first, Thanks again for the help.
 
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
Yes, the damage must come last, as that's what the method expects to receive back when executing that formula.


Instead of giving you a warn for double posting AGAIN, after you acknowledged and apologized, I'll explain to you ...


- double posting is when you post twice in a row. This is against the forum rules. If you need to post something new, and the last post is yours and it's less than 72 hours old, then hit the Edit button on the post.


- if what you want to add is a quote (as it is in this case), hit the quote button, copy what you want to quote, then edit your previous post and paste the quote.


- if you want to quote multiple people in a single post, hit the MultiQuote button on each post you want to quote, and when you've selected them all, hit the 'Reply to X quoted post(s)' button.


Anyway, since you seem to have worked out the buff, 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.
 
Last edited by a moderator:
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,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top