I'm currently using the following to check if any enemies have below 50% HP.
$game_troop.members.any? { |m| m.hp_rate < 0.5 }
Would there be a way to edit this to instead check if the enemy average HP is below 50%?
Thank you! Happy to say that the command seems to work great. Although, I ran into an oversight on my part.
I didn't realize this until testing the new command, but turns out both commands actually factor in dead (and hidden, although I don't know if that would be an easy fix) enemies too. Would it be easy to make the commands only factor in alive enemies?
I tried doing this myself with my original command with the following:
$game_troop.members.alive? { |m| m.hp_rate < 0.5 }
It seems to always give a false-positive, though.
Seems to be working great! Thanks again!
Ok, im not sure if i can ask this, since in the very beginning someone mentiones this thread is for event scripts only,
But I have an Problem with Yanflys convert damage script. It converts hp perfectely fine, but convert mp notetags simply doesnt work. At least with Armor, i need to try the others.
And if I cant ask the question above, i have another one: How can i include random Numbers in an Event. Like for example after attack, common event: choose randomly one of three actions and do it?
Alright, opened a new thread. Thank you.
Is there an elegant script call to check if any variables from a batch of 10-20 (non-consecutive) are equal to a value (or other variable)?
Okay yep, that did it! Thanks!
With the event command 'Gather Followers', the action is more or less instant.
Is there a script call which separates out the followers so that I could do
Gather follower 1
Wait #n frames
Gather follower 2
Wait #n frames
etc.
Thanks.
I have a script call which can identify if the party leader is actor 3. It is
$game_party.leader() == $game_actors[3]
How would I adapt that to find out if one of the followers is actor 3? I assume it would be something using
$game_player.followers
but I can't work out how to specify a particular follower.
Can anyone help?
Thanks.
I think you would do your conditional branch before each party member check that the npc is facing.
$game_party.battle_members[0] == $game_actors[3]
$game_party.battle_members[1] == $game_actors[3]
$game_party.battle_members[2] == $game_actors[3]
$game_party.battle_members[3] == $game_actors[3]