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 help with my status window

all right so what I'm trying to do is

make the Attack for a character the average of their strength and the damage of the weapon

so

I changed the

def base_atk on the Script Game_Actor

to look like this

Code:
  def base_atk
    weapon = $data_weapons[@weapon_id]
    atk1 = weapon != nil ? weapon.atk : 0
    atk2 = base_str
    return (atk1 + atk2) / 2
    end

OK so far so good

now heres the problem, I get into the game, I open my status menu and it's all good right?

than I use this item that increases my STR

and on the status window my STR goes up but my ATK stays the same

if I battle, I do more dmg, so it DID change, but it's not showing...

somebody help?
 
im not sure, i'll look at it at home if possible... but i wanna just quickly evaluate something (im learning about anti-lag and such recently) so heres a quick, less-laggy, edit of that script right there XD

Code:
def base_atk
  weapon = $data_weapons[@weapon_id]
  atk1 = !weapon.nil? ? weapon.atk : 0
  atk2 = base_str
  (atk1 + atk2) / 2
end

well i think thats right... sorry for the hijack though XD i just like to make stuff less laggy as VGVGF tought me... it is the most imposrtant thing in a game after all XD
 
I would guess that the problem is another script in your project messing it up.
Try making the change in a new project and see if it works. Because the code you have shouldn't be a problem. ^^
 

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