shatteredmindofbob's Forum Posts

  • 15 posts
  • Also, you're pressing space to both advance the dialogue AND to trigger the interaction, that's probably what's causing the loop.

  • I wonder if disabling the player movement in the function (and thus disabling it multiple times) is causing an issue.

    I just checked my project and I disabled player movement in the "talk to the NPC" event block and it works fine.

  • This is backwards:

    I followed the same tutorial and had the same problem. Those two events need to swap places.

  • The Construct manual mentions Waypoints in the MoveTo behaviour, but there isn't much information on what they do and how to use them.

    Has anyone used this feature?

    I'm not even entirely clear on what it would do.

  • I think better to share the project file. Fixing the position first will help, as mentioned above check the origin on the blue sprite. That is a separate issue though because the overlap is done with the purple sprite. Look in debug view at the variables I guess.

    ....and I fixed it. For some reason, at some point, I gave the guard sprite the Solid behavior, which seems to be the cause of the Set Position issues. Not sure why, though, since the mask was not Solid.

    The mask bypassing the waypoints is related to the 8-Direction behavior, which I guess is going to need some tweaking.

    Thank you everyone for your suggestions.

  • If you are setting one sprite to anothers .x and .y and they arent lining up visually I would guess, it's one of 2 things.

    Origin: This is a X,Y coordinate that is the home to your sprite. Some times manipulating a Sprites size will leave you with an Origin that is not where you expected it to be. You should check both your Sprite and Mask to verify they have the same size Sprite with the same Origin.

    Layers: Parallax or Scaling (And probably other properties) can have X,Y on 1 layer not match up with the X,Y of another layer.

    At the moment I only have one layer.

    All three objects are 16x16, origin point in the top left corner. I can overlap all three perfectly in the layout editor.

  • Why do you have two actions for set position?

    If the guard doesn't touch any yellow squares and the default is left then he will keep moving left.

    The the first set position is a different mask for a different sprite.

    The default is to do nothing, so the mask IS touching the first yellow square...but then moves up for some reason that I don't understand.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So, the purple box is the "mask" for the patrolling guard (turquoise dude). They're not lined up, despite having an Every Tick event positioning the sprite over the box:

    The second problem, see those yellow boxes? Those are waypoints that are supposed to mark the patrol path. The guard starts on the yellow box at the far right, but some reason, comes up a full grid square, so it never touches the other squares and keeps going left.

    My first thought was that changing the angle of the "mask" was the problem, except disabling those lines actually sends the box up even farther.

    So, I'm at a loss. What am I doing wrong here?

  • Thank you very much for your reply.

    Unfortunately, as soon as I re-enable Tile Movement, my player object runs off again.

    I also can't seem to find a way to get the "player spawner" object's GridX and GridY (even after giving it Tile Movement as well).

    All that said, I think I found the solution I probably should've been using all along anyway: having the "player spawner" object actually spawn the player instead of using Set Position.

  • While playing around, I found a clue. For some reason, after spawning, the player object is trying to run back to its previous position.

    ...Why?

  • I'm very new and trying to make my first "game" with Construct.

    However, I've run into some odd issues using TileMovement for the player.

    First, when player spawns on the first playable screen, the player sprite runs off on its own and only stops when it hits a solid tile.

    In trying to fix it, I did find that I was spawning the player on the wrong layer. However, changing it to the correct layer only seemed to change the direction it runs off in.

    I'm using "default controls," so there's no "Simulate Movement" involved here. All I do on the first screen is spawn the player using a spawner object (Set Player Position PlayerSpawner.X, PlayerSpawner.Y).

    This only happens on the first screen. Moving to a new layout does not cause this issue.

    Also, the issue doesn't happen if I switch to 8-Direction Movement.

    Oh, and if I place the player manually, the issue doesn't seem to trigger.

    The second problem I'm having is that collisions seem to be way to sensitive. I'm moving to new layouts using an "exit tile" but placing the player spawner on an adjacent tile causes the game to start looping between layouts.

    Does anyone have any ideas of advice?

    Thank you.

  • I had the same problem, turned out to be a Firefox issue. Everything worked fine in Edge.

  • So, it looks like the problem might've been that I was using Firefox. Tried it in Edge and everything worked as expected.

    It still doesn't explain why it worked a few days ago, though.

  • Thank you for your reply.

    While that makes sense, I don't understand why it worked fine a few days ago and not now. Plus, like you said, I would think keyboard interaction would count.

  • So, I'm completely new to Construct.

    In one of my experiments, I added a sound that plays when collecting pick-ups. Worked fine. I come back a few days later, I changed a few things and suddenly the sound doesn't play...unless I click on the game...then the last sound will play for some reason.

    (I should add, everything I've made up to this point is keyboard control only.)

    Now, if I click somewhere in the game before I do anything, everything works as it should.

    And I'm trying to be specific when I say, "click on the game." Clicking on the Windows title bar does fix the issue.

    I also added sound to a different project and it has the same issue.

    Any idea what might be wrong?

    Thank you.

  • 15 posts