Help - Search - Members - Calendar
Full Version: Melody help
RPG RPG Revolution Forums > Scripting > Script Development and Support > RGSS2
silvershadic
In melody, there is an "If" function. I'm attempting to make a gun using it.
The melody for it is as follows.
CODE
<MaxMP: +7>

<whole action>
create icon: user, weapon
icon: user, weapon, bow
pose: user, 2h swing reverse
automelody: GUN FIRE
</whole action>

<target action>
if user.mp > 0
attack animation: wait
MP -1: user
attack effect: whole
move target: backward, wait

if user.mp = 0
animation 148: user, wait
end
</target action>

<follow action>
delete icon: user, weapon
</follow action>


Everything works perfectly, except for MP - 1 ((MP represents ammo)). It completely drains the MP instead of removing one. How can I fix this?
Twilight
shouldn't it be -= 1 instead of -1
In scripting sense when you add/subtract it should be +=/-= value.
silvershadic
QUOTE ("twilight")
shouldn't it be -= 1 instead of -1
In scripting sense when you add/subtract it should be +=/-= value.

That didn't change anything. After I checked it in BEM II it was set up as
CODE
MP -x: tune1, tune2

Actually before I added in the second option, it worked fine and only subtracted one ((I haven't edited this line at all)). It was only after adding in the second option for when MP = 0 that it started acting up.
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.