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 some help with a Skill Window

xiffix

Member

I'm making a sim game such as the "SimGirl" games and I want to have a window in the left corner that shows:
Knownledge
Energy
Etc.

I'm trying to script it but I just started like... 3 days ago with the scripting, can someone help me with this? :please:
 

xiffix

Member

Well... Actualy, I know how to make windows and stuff, but the problem is that I don't know how to let it refresh itself when you gain a knownledge point and/or lose energy because you did something.
And, I know there are global Variables, but I don't know how to add points to the global variables so that it can be shown in the "Skill Window".
 

Mac

Member

You still need to be more specific, from what i get you want to know how to refresh a window...if so thats simple. Just use something like this:-

Code:
yay_window.refresh

Remember to name it correctly as thats just an example.

Global variables are set very simply. e.g.

Code:
$iamaglobalvariable = 1

To display something like this....paste this where you want it to be drawn.

Code:
self.contents.draw_text(0, 0, 120, 30, $iamaglobalvariable.to_s, 2)

But if this isn't what you wanted to know then you need to be alot more specific
 

xiffix

Member

Ok, I´ll be more specific:

I'm making a Simulation game (so no fighting), in this game you will be able to gain points:

Knownledge
Reputation
Power
Etc.

When you go to school to gain Knownledge points you get tired (every time you gain a Knownledge point, you lose one energy point).

Now I would like to have a window that shows the player how much points he/she has:
How many energy points he/she has left, how many Knownledge points etc.
A window like:
_____________________
|Energy: 5..................|
|Knownledge: 25..........|
|Reputation: 7..............|

Am I specific enough?
 

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