- Joined
- Nov 6, 2013
- Messages
- 20
- Reaction score
- 1
- First Language
- Dutch
- Primarily Uses
Hello RPG Maker community!
I am trying to get a skill to cost equal to the caster's level times 5. The effect of the skill will be, to heal the ally's HP equal to the caster's level times 10.
I tried using the damage formula like so:
a.mp >= a.level * 5 ? a.mp -= a.level * 5 && b.hp += a.level * 10 : 0 But that healed 0, and used up ALL the MP!
Then I tried to use Yanfly's Skill Cost Manager, and tried to do this:
<custom cost requirement>user.mp >= user.level * 5</custom cost requirement><custom cost perform>user.mp -= user.level * 5</custom cost perform>User refers to the Scene_Skill script, standard included in RPG VX Ace:
#-------------------------------------------------------------------------- # * Get Skill's User #-------------------------------------------------------------------------- def user @actor endAll I get is the following error message (before I even selected the skill itself):

I understand that "user" does not exist in the current context (when showing the skill in the skill-menu, in-battle)
Although, I really don't know what else to use.
Yes, I am new to Ruby and scripting in RPG Maker, but not to programming with other languages.
If anyone could help me out, that would be much appreciated!
I am trying to get a skill to cost equal to the caster's level times 5. The effect of the skill will be, to heal the ally's HP equal to the caster's level times 10.
I tried using the damage formula like so:
a.mp >= a.level * 5 ? a.mp -= a.level * 5 && b.hp += a.level * 10 : 0 But that healed 0, and used up ALL the MP!
Then I tried to use Yanfly's Skill Cost Manager, and tried to do this:
<custom cost requirement>user.mp >= user.level * 5</custom cost requirement><custom cost perform>user.mp -= user.level * 5</custom cost perform>User refers to the Scene_Skill script, standard included in RPG VX Ace:
#-------------------------------------------------------------------------- # * Get Skill's User #-------------------------------------------------------------------------- def user @actor endAll I get is the following error message (before I even selected the skill itself):

I understand that "user" does not exist in the current context (when showing the skill in the skill-menu, in-battle)
Although, I really don't know what else to use.
Yes, I am new to Ruby and scripting in RPG Maker, but not to programming with other languages.
If anyone could help me out, that would be much appreciated!


