Notice: fwrite(): Write of 467 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 59 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 1714 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 44 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 8192 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96
Print Page - [RMVX] Increase MP using script code?

The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: Foghart on March 14, 2013, 07:01:27 PM

Title: [RMVX] Increase MP using script code?
Post by: Foghart on March 14, 2013, 07:01:27 PM
Hello folks!!
I was using the SBS Configurations and I found this line:
#--------------------------------------------------------------------------
# ? Script Operation Settings
#--------------------------------------------------------------------------
  # Type - Always "script"
  #
  # Inserts a simple script code into the action sequence. In the sample,
  # where it says p=1 can be replaced with any script. Character strings
  # and anything beyond functions will not work. (?)
  # ?              ??  Type   
  "TEST_SCRIPT"   => ["script", "
 
  p = 1
 
  "],

Then I'm trying to do this trick on the battle scene.
My basic attacks do more than 1 hit, they do 2 or more hits based on the skill and character, not a problem it is all working fine. On my project, when you deal damage with your basic attack, you gain SP (Spiritual Points) and with that you can execute more powerful skills, without bein conserned about loss of SP like magicians, here we go.
When they deal damage, I want the actor to gain 5~15 SP when the attack is dealed, so I've been thinking if there is some way to write a script code on this Script Operation Settings that charge the hero SP! Something like:

#--------------------------------------------------------------------------
# ? Script Operation Settings
#--------------------------------------------------------------------------
  # Type - Always "script"
  #
  # Inserts a simple script code into the action sequence. In the sample,
  # where it says p=1 can be replaced with any script. Character strings
  # and anything beyond functions will not work. (?)
  # ?              ??  Type   
  "Hero 1 SP"   => ["script", "
 
  "code that charges 5~15 SP to Hero 1"
 
  "],

"Hero 2 SP"   => ["script", "
 
  "code that charges 5~15 SP to Hero 2"
 
  "],


Then:

"NORMAL_ATTACK_HERO1"          => ["PREV_MOVING_TARGET","WPN_SWING_V","OBJ_ANIM_WEIGHT","One Wpn Only",
"Hero 1 SP","16","Can Collapse","FLEE_RESET"],


"NORMAL_ATTACK_HERO2"          => ["PREV_MOVING_TARGET","WPN_SWING_V","OBJ_ANIM_WEIGHT","One Wpn Only",
"Hero 2 SP","16","Can Collapse","FLEE_RESET"],


So, you guys know what I can write on the Script Operation Settings??
Thanks alot!!