Fonduede's Recent Forum Activity

  • Line 11 is triggering, it's what keeps the pieces that are successfully inside the grid from moving when the arrows are pressed.

    I certainly do think that families would solve this issue, and in fact, learning about families opens up lots of interesting possibilities that I have been pondering about, but, unfortunately, I don't have a license for Construct, so I guess I can't do what I'd like, haha.

  • I'm working on a drag-and-drop puzzle block game. The player toggles through the pieces available, then drag-and-drops the piece they want onto a grid.

    Now what happens is, if the player drops a piece in the wrong spot, IE out of the grid, over a differently colored piece, or on the boundary walls, it destroys the piece and creates a new one at the starting point. The same happens if the player correctly drops a piece into the grid, it creates a new piece for the player to drag around at the starting point.

    The problem I am having is that it won't delete pieces that are the same as itself!

    The player has small arrows to toggle between different shapes for, say , Red Piece. None of the red pieces will be destroyed if they are dropped on top of other red pieces. Everything else works great, but the red pieces won't destroy when dropped on other red pieces.

  • I was able to get the Tile Map method to work! My pieces are dropping in properly and giving the player points! Thank you!

  • It's a bit strange, but I can't seem to locate Pick Nearest in my Construct at all. I've found a few images and topics where people refer to Pick Nearest, but I don't seem to have it in mine. Is this something I have to download from somewhere?

    I have my square cell sprites prepared and laid out, as well as my drag and drop behavior set on my red and blue pieces, but none of these seem to have this condition available.

    So I decided to try laying out the tilemap as you suggested, and I got so far as On RedPiece DragDrop Dropped > Set X "Tilemap.SnapX". What expression goes in the parenthesis to snap my piece

  • I'll give this a try and report back!

  • I'm working on a block puzzle minigame that I intend to use as an inventory management sort of deal for a larger game.

    In this game, the player needs to arrange blocks on a grid.

    The player can click and drag the pieces onto the grid and rotate them with A and D. If the player drops the piece on the boundary, or on top of another piece. the piece returns to its home area.

    My question is, how do I get these pieces to "click" into place, so that when the actual graphics for the pieces are brought in (which will snugly take up the entire grid space) they all line up nicely and neatly? I had the idea of making the grid underneath a sprite, and placed image points at the center of each black node. I figured I could have the pieces check to see if they are colliding at all with any other pieces or bounding boxes, then, once those checks are passed, have it align an image point on the piece with an image point on the grid.

    However, either this sort of thing isn't supported or I just don't know how to access those features.

    Does anyone have a suggestion on how to achieve this piece clicking effect?

  • Well if it's any help, in Construct 0-degrees means something is pointing to the right, and then the degrees go upwards in a clockwise direction. So if you're traveling to the right, a number between 0 and 90 is going down, and a number from -270 to 0 is going up a slope.

    In the Line Rider game you could also slide backwards, though, and it wouldn't change which way you were facing. In that case, traveling left while having an angle of -270 to 0 would still be on a downward slope!

    So in that case, in your events you first need to determine if you are facing left or right, then you need to determine if you're MOVING left or right, and THEN you have to find the angle of the slope to figure out if he is going up or down a slope.

    I'm new to construct myself, so this is the only thing that popped into my head, haha.

  • I had a situation similar to this in a little experiment I was doing when I started using Construct (keep in mind though I have only been using construct a very short time) that was similar to this.

    You could try getting the coordinates of the moving object when it collides with the wall, then set its X and Y to that coordinate at the end of the event.

  • After cranking away at this for a bit, I may have come upon my solution, maybe.

    Would I be loading from a JSON file? I assumed that the load function in Construct wasn't the right one to use since it mentioned using a webpage, but I keep seeing JSON popping up on all the subjects I am Googling.

  • Hi there, all!

    First off, let me preface that while I do have a basic understanding of arrays, the grip I have on the concept is very loose. I understand just enough from the tutorials and the manuals to do what I want, but I'm starting to run into problems that I think could be solved by arrays, but I don't know how to proceed.

    So, here it goes.

    I plan to have levels in my game. Each level will have a certain number of certain times of enemies that will spawn. I think that it would be very useful to have stored data on each level of my game somewhere instead of filling in a ton of events for the game to have to go through each tick, which I can do with arrays. These arrays would be numbered, and then have the list of enemies as the index, and the number of enemies to spawn on that level as the value.

    So the idea that I have is that the battle layout has a blank array of spawn data. Upon starting the layout, an event checks the number of the level the player is on, then fetches the corresponding spawn data from another array and fills the current array with that data. The layout then uses uses that newly filled layout for the actual game, subtracting from that battle array until numbers reach zero. When all numbers reach zero, the level is completed.

    The thing I don't know how to do is create that prefilled array. Is there a way to make an array elsewhere, with the data pre-entered, and then have Construct call on that data? My knowledge on arrays is still a bit limited. The array I've used so far is pretty simple. It's a small 1D array with seven values, each which corresponds to a potential "lane" in my game that enemies can spawn in. So I use that array to determine if an enemy is already spawned in a lane, and if it is, it sets the value of the corresponding lane to false. When the enemy dies, that lane is returned to true, and can be used to spawn another enemy.

    That's essentially the extent of my knowledge. I've got a system rigged up to fill the array at the start of the layout with the data I need.

    Thank you for your time!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Containers worked perfectly, thank you!

    As a note for some side effects, I had to make a few minor changes to the game so that stopping an incoming attack didn't also damage the monster attacking.

    Thank you so much for your help!

  • I see, I didn't know about containers. or UID. It seems like containers will be very useful going forward for putting together enemy types.

    But reading the documentation on containers makes me think that this might still be an issue... won't deflecting or destroying the attack also destroy the enemy?

    Unless, of course, I just have set attack points on each enemy where they can have an attack go off, and just toggle visibility when an attack starts, ends, or is avoided.

    I'll mess around with this and post results. Thanks for the tip.

Fonduede's avatar

Fonduede

Member since 9 Sep, 2014

None one is following Fonduede yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies