RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

use a skill to change a variable

Started by nekollx, December 25, 2010, 01:29:13 PM

0 Members and 1 Guest are viewing this topic.

nekollx

trying to get the syntax right for a skill im using in the melody battle engine, basicly each actor (and enemy) has 2 reserved variables "current degeneration" and "max degeneration" but can't figure out the syntax.

Basicly when you target someone with this spell it lowers Current Degeneration for that target by X% and increases the casters own by Y% UNLESS they have Item Z equiped then it's only half of Y

<target text>
Lowers target's Insanity
</target text>

<target: {Not sure none of them seem to be single target enemy OR ally}>

<whole action>
hide nonfocus
immortal: targets, true
script: @active_battler.actor?
animation 102: user, wait
</whole action>

<target action>
teleport: user, target, front
create icon: user, weapon
if @active_battler.actor?
icon: user, weapon, swing
wait: 1
if @active_battler.id == 2
$game_variables[8] - 30% #var specific for actor 2
$game_variables[9] + 10% #var specific for actor 1
{print a text box with "<targetname>'s Insanity reduced to $game_variables[8] of 120"}
{print a text box with "<caster>'s Insanity Increased to $game_variables[8] of 130"}
elsif @active_battler.id == 3
$game_variables[10] - 30% #var specific for actor 3
$game_variables[9] + 10% #var specific for actor 1
#needless to say i will need several conditionals here
{print a text box with "<targetname>'s Insanity reduced to $game_variables[8] of 90"}
{print a text box with "<caster>'s Insanity Increased to $game_variables[8] of 130"}
else
{print a text box with "Incurable Target"}
end
end
ani wait: 3
delete icon: user, item
wait: 3
</target action>

<follow action>
teleport: user, origin
delete icon: user, weapon
immortal: targets, false
show nonfocus
</follow action>