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.

A Nooob question...

Ark

Member

Hi!

I'm asking your help about a problem of mine. I hope I can find answer here. :*)

I made a time system with common events. It uses variables for minutes tenminutes hours and days(0-6), and it works perfectly. I changed the menu system of mine to show the "variable clock" in the menu, but I just don't know how to make the name of the seven days appear in the menu. I know it's not that hard to do. I tried the 'if' command, and I think that's the key for it, but I'm suck in scripting.

I want you guys to write a peice of code for me, how to show "monday" in the menu when variable #0004 == 0, and "thusday" if variable #0004 == 1, and so on until variable #0004 reaches 6, which is sunday.

I hope someone helps me out of this. Thanks for the help. :#
 
Code:
case $game_variables[4]
	when 0
	@day = 'Monday'
	when 1
	@day = 'Tuesday'
	when 2
	@day = 'Wednesday'
	when 3
	@day = 'Thursday'
	when 4
	@day = 'Friday'
	when 5
	@day = 'Saturday'
	when 6
	@day = 'Sunday'
end
self.contents.draw_text(0,0,100,32,@day)

something like that :yes:
 

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