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.

One State at a Time

Is there anything I can do to the scripts so an actor can only have one state applied at a time? And also, how do you change the name of the default [Normal] state?
 

ogh

Member

this is in Window_Base

Code:
def make_battler_state_text(battler, width, need_normal)
    brackets_width = self.contents.text_size("[]").width
    text = ""
    for i in battler.states
      if $data_states[i].rating >= 1
        if text == ""
          text = $data_states[i].name
        else
          new_text = text + "/" + $data_states[i].name
          text_width = self.contents.text_size(new_text).width
          if text_width > width - brackets_width
            break
          end
          text = new_text
        end
      end
    end
    if text == ""
      if need_normal
        text = "[color=red][Normal][/color]"
      end
    else
      text = "[" + text + "]"
    end
    return text
  end

the red code is the normal state name ("[Normal]")
 

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