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.

How do you make variables in the game show up on a page?

I was wondering if you could make a variable from an event show up in the game inventory through the use of scripts.

An example would be that I'm trying to use variables with skills so people can purchase spells and skills with points and gold. I want a section in the inventory to show these points so people can view the points they have with having to use an item that shows a message that tells them how any points they have.

If anyone knows how to do that, please tell me.
 
I seems like you know nothing about scripting.
If you wish to request a script made, use the script request forum.
Secondly, Please be more specific: is it for XP or VX, how your point system works, where exactly should the points be shown, etc.
 
It's for XP and I am using variables through events to do the point values. I am using a command in the menu to go to a new page and I need to make the variable numbers show up, but I don't know how to. I just need to know how to show the numbers, not a whole script, if that is possible.
 
I'm not sure I understand you.

I'll assume by page you mean window. The code is:
[rgss]self.contents.font.color = normal_color
    self.contents.draw_text(x, y, w, 32, $game_variables[n].to_s)
[/rgss]
You must set x,y,w,n first.
x,y = coordinates on the screen (0~640 and 0~480)
w= width of text (should be 24+)
n= number of variable (1~5000)

If by page you mean a text box, just write this in the text:
/V[variable_number]
 

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