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.

Some help with Beastiary

I'm using Prexus's Bestiary script, and was wondering how to make this line activate only when a switch was on

Code:
class Game_Enemy < Game_Battler
  alias pxmod_g_enemy_initialize initialize
  def initialize(troop_id, member_index)
    pxmod_g_enemy_initialize(troop_id, member_index)
    enemy = $data_enemies[@enemy_id]
    enemy.set_seen(true)
  end
end

Because, the true/false controls whether it records the enemy in the bestiary (from what I've seen) and I only want it to record an enemy during certain parts of the game.

I think this belongs in RGSS support. Thanks to any who can help.
 
Code:
if $game_switches[[color=red]Switch ID[/color]]
  class Game_Enemy < Game_Battler
    alias pxmod_g_enemy_initialize initialize
    def initialize(troop_id, member_index)
      pxmod_g_enemy_initialize(troop_id, member_index)
      enemy = $data_enemies[@enemy_id]
      enemy.set_seen(true)
    end
  end
end

Not sure if this will work though..

~Budsie
 
*POST DELETED*

The script I posted did not work!
I downloaded the actual Demo and I'm gonna try to get it right now.

EDIT: Tried my best, nothing worked.
I'm sorry, but I can do a "switch" in the script that you set true or false BEFORE you play; not while playing.
It's more of a setting then.

Good luck though,
Budsie
 

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