bard's Forum Posts

  • 10 posts
  • Heh, yeah, most of the other stuff in the file is scaffolding so I can test things. Long ways to go.

    I ran the updated capx and checked the debugger. The new method is pulling out a handful of entries, but not the ones I'm looking for. Here's what shows up in the debugger (array - index:value):

    aSaved - 0:0, 1:1, 2:2, 3:3, 4:4

    aIconPool: 0:1, 1:7, 2:9, 3:10, 4:11

    Right now, aSaved is loaded with dummy data 0-4 and aIconPool is loaded with dummy data 0-11. The output I'm looking for is to subtract aSaved from aIconPool, leaving aIconPool with the values 5-11.

    I'm going to keep experimenting/hitting my head against the wall until I figure out what's going on.

    Thanks for taking the time to check this out!

  • Hi all. I've been working on a simple memory palace/recall game to practice using arrays. Problem is, I'm stuck and can't seem to figure out how to get unstuck. As always I'm probably overlooking something basic, but I could use a nudge in the right direction.

    Here's the basic flow of the game:

    1. Tap the screen and a random icon appears. Repeat several times.

    2. When a certain number of icons have been seen, go to the quiz screen.

    3. Quiz screen shows a grid of all the icons. User must tap to select the icons he or she saw in the previous screen.

    4. After the quiz screen, correct guesses will be added to an array for permanent storage.

    5. Next round is the same as the first, only now the icons that are shown do not repeat icons the user has correctly guessed.

    (.capx file to see the in-progress example. Ignore the incomplete sections, just stay on main-sheet)

    I've been using two arrays in my attempt to accomplish the last task:

    • Array1 (aIconPool) holds randomized numbers used to spawn icons.
    • Array2 (aSaved) holds a record of the correctly guessed icons.

    The idea is to subtract the contents of the second array from the contents of the first. My problem is I can't find a way to do this. The events pictured below do something similar, but incorrect:

    So, what's wrong with the above setup? I've tried various permutations of event ordering and nesting, but they're just as broken.

    Also, if my entire approach is too convoluted, feel free to tell me as such.

    Thanks!

  • Really awesome start! I'm intrigued to see how large you make the game. I kinda like not having a map, makes it feel even more old school.

    Also, I would love to either take a peek at the source or hear how you went about structuring the map navigation. I've been wanting to try making a first person RPG like this for awhile but haven't come up with a good coding solution.

  • Sounds good, I'll give it a go. Thanks!

  • This is where I run into problems. When I try setting the grid cells to display data from the array, all I can do is set the ENTIRE grid to display a single value. How can I set it to run through each instance's gridNumber and set it to the appropriate array coordinates?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Right, but an array doesn't reset between layouts, correct? I need to set the grid to remain as the player left it no matter which layout he/she goes to.

  • Working on a grid-based puzzle with a 3x3 layout. Each cell contains the numbers 1-9, and when the player clicks on a number it increases. The goal is to set a certain pattern.

    Brief overview of how I built the events/actions:

    * Click a grid space to increase its instance variable by one

    * Every tick, for each XY element, set the CurX/CurY values to the instance variables. Also set the displayed text to the same.

    * For testing purposes, switch layouts and see a text readout of the cells.

    I can get this to work just fine, but when I return to the original layout, the array always resets. I've tried different solutions but each one breaks the setup in some way, usually setting the entire array to output a single number.

    I've read through the manual and tutorial on arrays, but there's obviously something I'm missing with either object instances or arrays, because this is just not working out. Test .capx file included below. Any help would be appreciated!

    dl.dropbox.com/u/564834/array-tests.capx

  • Ooh, good starting place. The solution used is a lot like the one I used for an earlier puzzle, but a little neater.

  • Digging deeper into Construct 2 to get some more puzzles in the point and click game I'm working on. I ran into a speedbump with implementing a letter-based lock for a door. Basically, I want a few small displays that show one letter at a time. Players can click a button/arrow to cycle through the alphabet in order, set the correct code, and unlock the door.

    I've made smaller puzzles like this before, but it's easy to switch a few objects or sprites around when you're only working with a handful of symbols. With the entire alphabet, though, it's a different story.

    Any suggestions on how to progress? I'm studying up on arrays now, but so far haven't seen much info about simply retrieving a static list and displaying it on the screen.

  • Hi all! Working my way through the early days of Construct. I've completed several tutorials and experimental games then decided to try making a point and click room escape game. Nothing fancy, just one of those still-screen games where you find a key, open a safe with a number code, unlock a door, etc. Think Myst but way, way simpler.

    I ran into a problem I can't seem to solve. Is there a way to create invisible clickable hotspots on a layout? So far I've been using invisible buttons and images chopped into pieces and calling the Mouse: On left button click on object event, but it seems like there has to be a better solution. As far as I know, I can't set image points in the animation dialogue and reference those, so I'm at a bit of an impasse.

    Any thoughts or resources you could point me to?

  • 10 posts