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.

HBGames

Okay, I've been looking around and can't seem to figure this out...

How do you access arrays in a certain class from a different class?

LIke... If Class1 had @array1, how could I access that array from Class2. I've tried using attr_accessor :array1 (for example, not really that), but I don't really even now how the attr_accessor works... I've just been trying to do array = Class1.array and it's not working...

...Am I making any sense?

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