How do I make a room layout using an array?

0 favourites
  • 2 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • I'm wanting to make a typical dungeon-style game (think Undertale) and I'm using an array to determine where all the rooms are connected. It's a 3D graph with 4 depth layers--one for each floor of the castle.

    At x=10, y=18, and z=0, the name of the room is "dungeon1", and to test how the array works I tried to make a text object to show what the cell at that position contains (which should of course be "dungeon1"). So I used "Set text to Array.At(10,18,0)" hoping that it would make the text read "dungeon1", but it didn't. It just set it to 0. I can't figure out why; the contents of the cell at 10,18,0 do not say 0.

    Any help?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Never mind, I fixed it by making sure I was loading the array from Ajax separately when the request was completed instead of doing it immediately at the same time as the request.

    Conclusion: I am dumb :D

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)