public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

Basic hp/mp scan script

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: Basic hp/mp scan script
  • Original author: Cecil_Sabin_Cloud
  • Original date: March 4, 2016
  • Source thread: https://forums.rpgmakerweb.com/threads/basic-hp-mp-scan-script.57896/
  • Source forum path: Game Development Engines > Legacy Engine Support > RPG Maker VXAce Support

Summary

I've been having a really tough time with a basic enemy HP and MP "scan" script.  I've tried Yanfly Engine Ace - Enemy Target Info, but it's actually way too fancy for what I want.  I just want to have an actor use a skill that shows whatever enemy he/she targets' current HP and MP.  I think I'm close.  Right now, I've got a skill that adds a state to the target called "Revealed".  The index of the state is '026' in my game.  The skill also calls a common...

Archived First Post

I've been having a really tough time with a basic enemy HP and MP "scan" script.  I've tried Yanfly Engine Ace - Enemy Target Info, but it's actually way too fancy for what I want.  I just want to have an actor use a skill that shows whatever enemy he/she targets' current HP and MP.  I think I'm close. 


Right now, I've got a skill that adds a state to the target called "Revealed".  The index of the state is '026' in my game. 


The skill also calls a common event which has a script that sets two game variables, which I then display in a battle text window.  Here's the common event:


Protected download


The script text I have (which is also in the image) is:


$game_troop.members.any? { |m| m.state?(26)$game_variables[5] = m.name$game_variables[6] = m.hp$game_variables[7] = m.mp}


I'm not very good with Ruby, but my understanding is that this script is supposed to check to see if *any* enemy in a troop has the state 'revealed' (index 26) applied to it, and then set my game variables with that target's name, and current hp and mp.  The problem is though that no matter which enemy in a troop larger than one that I target, it always only returns enemy A's hp and mp.


Can someone point out what stupid thing I may be doing here?


Thank you!!!

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download

Referenced Images / Attachments

Untitled.png
Untitled.png
Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#039#rpg-maker-archive#vxace-support

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar