What if a state was applied when the actor had lower then 100% HP that sealed the skill?
That doesn't make it any easier, I'm afraid, only more complicated. There has to be something I'm simply doing wrong with the notetag, I believe. I mean, the notetag is exactly there for things like the one I am trying to do here, isn't it?
Well. If you don't have any skills that pay HP to activate you could delete the pay HP part of the script and set the cost of the skill to actors HP
I did this with MP in my fairytale game with the tactics oger battle script. And now you can only use certain magic attacks when MP has charged to a certain amount
(I had to dig through scripts to find the pay MP though)
Is there a way to specify actors MHP in the cost?
Oh, it has nothing to do with costs, actually. I simply want the skill only to be usable at full HP, but it doesn't cost any HP. Think of Link's sword beam in The Legend of Zelda. 🙂
I didn't test it, but I think you just have to negate the condition (the skill is restricted while the condition is fulfilled).
Haha, wow. That was it indeed! 😀 I would have never figured that out on my own. Thanks a lot, man!
I've got an issue with this script's custom eval, too.
I'm trying to restrict a skill based on the presence of another actor in the battle party (who must also be alive).
<restrict eval>!$game_party.battle_members.include?(7) # Restrict if battle party doesn't include Actor ID 7or $game_actors[7].state?(1) # Restrict if Actor ID 7 has State ID 1 applied</restrict eval>This isn't working (it isn't crashing, but the skill is ALWAYS restricted. I'm just wondering if my syntax is screwed up?
Hi there,
Your formula looks fine except two little issues:
First, $game_party.battle_members returns an array of actual actors and will therefore never contain 7 as a number.
You can use $game_party.battle_members.include?($game_actors[7]) instead.
If the restriction formula does only matter in battles anyway, you could also use
$game_party.members.include?($game_actors[7])
or even
$game_actors[7].index
instead.
Second, the script removes any newline characters from your restriction formula. If you use a comment, the following lines will just get concatenated to the comment and ignored. If you want to comment your formula, best place the comments outside of the <restrict eval> tags.
The commented code was only in this post, it's not in my actual notetags, but thank you for the assistance. Gonna test it right now.
Working as intended, thank you very much.