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.

[Resolved] Dilemma in Progress

Status
Not open for further replies.
I want to define a variable with two values. I think It's possible doing this?:

@variable = ["hello", 123]

Well is it possible to extract only one of the values from that variable? Like put:

@value1 = part 1 of @variable



EDIT::: Nvm... I think it's @variable.min and @variable.max. Am I right?
 
Yes it would, but you'd have to make @mood an array first.
Like:
Code:
@mood = []
@mood[0] = ["044-Skill01","Anger"]
p @mood[0][0] # => "004-Skill01"

The 0 is the index in the array. If you'd use
@mood[0][1] then you'd get "Anger".
 
This topic has been resolved. If sasuke89 or any other users have any questions or further problems regarding this topic, please create a new thread about them.

Thank you!
 
Status
Not open for further replies.

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