use a skill to change a variable

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 74
RMRK Junior
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

Code: [Select]
<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>