Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Need a basic Scan spell ability

Hi! I'm new around here, and I've searched all around for a tutorial where I can give my characters a scan ability (like in the Final Fantasy games) But All I seem to find are tutorials meshed inside others adding other features that I neither want nor need.

So I basically need:
A spell that scans an enemy, any enemy that the character selects, then displays that particular enemies' HP, SP, STR, DEX, AGI, etc.

Would anyone be willing to help me out?
 
Add the following line to Scene_Battle 3, update_phase3_enemy_select method (line 277)

Code:
       # added for "Show Enemy Stats" skill / common event
       $game_variables[4] = @active_battler.current_action.target_index + 1
This will set game variable 4 to the index of the selected enemy

Create a skill (I'll call it Show Enemy Stats)
Scope: One Enemy
Occasion: Only in Battle
Common Event: 005: Show Enemy Stats
SP Cost: your decision
Power: 0
Hit Rate: 100
Variance: 0

Now, create the common event..

Code:
@>Conditional Branch: Variable[0004: active enemy] == 1
   @>Control Variables: [0006: Enemy HP] = [1.]'s HP
   @>Control Variables: [0007: Enemy SP] = [1.]'s SP
   @>Control Variables: [0008: Enemy STR] = [1.]'s STR
   @>
 : Branch End
@>Conditional Branch: Variable[0004: active enemy] == 2
   @>Control Variables: [0006: Enemy HP] = [2.]'s HP
   @>Control Variables: [0007: Enemy SP] = [2.]'s SP
   @>Control Variables: [0008: Enemy STR] = [2.]'s STR
   @>
 : Branch End
@>Text: Enemy \v[4] HP: \v[6]
       : Enemy \v[4] SP: \v[7]
        :Enemy \v[4] STR: \v[8]
@>
Add the skill to one of your actors, and test it out.

Be Well
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top