Help - Search - Members - Calendar
Full Version: Magic Drain issue/question
RPG RPG Revolution Forums > Game Engines > RPG Maker VX Ace Discussion
vvalkingman
So I have a character that starts out with 1 MP. Their ability, Magic Drain, drains mp from an opponent and increases their max mp by a random number(which can be set and increases as they gain more max mp). As this character gains max mp, they learn skills, increase stats, etc etc. It's like they are "regaining their lost power". I have accomplished most of this by using a common event on a skill that does mp drain. The following are my problems:

1. The common event effect happens even if the skill misses and even when the enemy being drained has no mp.
2. FIXED -edit

Is there a way for me to check in the common event effect if the enemy that I targeted with magic drain has zero mp? When I look through the menu it only lets me choose 1. thru 8.

Any ideas on how to fix these issues? Thanks in advance! biggrin.gif
vvalkingman
*bump*

I mean, there has to be a way to call the variable that represents the enemy you just targeted with your skill....anyone have any ideas?
vvalkingman
*final bump*

I'll give it one more shot otherwise I guess I'll just have to figure out something else...
Kaleb Daub
Do you mean you want it to say no mp to drain if there isn't any or do you want the player to see that there is no MP when they look at the enemy. If it is the second scenario you can use this script to show enemy HP, MP. and TP when the target is selected. You can get it from here.
http://www.rpgmakervxace.net/topic/2285-enemy-hud/
You decided which gauges are shown with what enemies.
vvalkingman
QUOTE (mooshra @ Jun 30 2012, 10:20 AM) *
Do you mean you want it to say no mp to drain if there isn't any or do you want the player to see that there is no MP when they look at the enemy. If it is the second scenario you can use this script to show enemy HP, MP. and TP when the target is selected. You can get it from here.
http://www.rpgmakervxace.net/topic/2285-enemy-hud/
You decided which gauges are shown with what enemies.


Actually I was asking if there was a way to check the mp of the enemy you targeted and if it was zero not have my common event run. I figured it out. Basically I put THIS in the skill formula:
$game_variables[0004] = b.mp;if b.mp==0;0;else;20 + a.mat - b.mdf * 0.5;end;

I was able to take that variable and check in my common event if the enemy had zero mp and if it did...then the common event didn't do anything. It's actually pretty simple to do strange things like what I wanted if you utilize the formula bar. Thanks for your help anyway though, mooshra smile.gif

Btw, I laughed like a mad scientist when I figured it out lol
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.