ZachR's Forum Posts

  • I initialized the array and put together this system for a simple inventory. When I pick up any item, everything works as intended. I can use the item, the sprite gets destroyed, etc.

    The issue appears when I pick up a second item, as it overwrites the first. Does anyone know what might be happening? Here are some screenshots.

    The checkSlot loop was meant to bypass indexOf to see if that was the issue, but nothing changed. Running this with or without indexOf vs running it without the loop doesn't change anything.

    firstEmptySlot is my global variable.

    In the debug example above, when hitting E on either of these items, it's added to the correct first spot in inventoryArray.

    tempWatchValue (watching inventoryArray.IndexOf("")), also changes to 1 as it should. Picking up the other item doesn't change it anymore though, and just replaces the first item. Thank you for any help!

  • Got it! Just added the global variable system condition I made for preventing movement to this as well. Posting it here in case somebody comes searching. Thanks everyone!

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

    Wow yep, that's exactly what it was! Thank you! It works fine if I use two different buttons.

    But now I'm wondering how I can get around that, as I'd like a single interact button instead of needing to switch. To keep things intuitive. I'll figure out a little thing to keep E from being used as an interact button while in dialogue.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > This is backwards:

    >

    >

    >

    >

    >

    >

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

    Hm I switched them and there's still the same issue. Everything works perfectly until the very last line of dialogue.

    Actually, after switching them it now loops back to the start of the first dialogue unless I wait for it to finish completely. After waiting for it to finish and then moving on, the second dialogue plays. If I don't wait for that to finish it loops back to dialogue one again.

    If I DO wait for dialogue two to finish as well, THEN try to exit, it loops through dialogue two and never goes back to one.

    PS ignore the difference in buttons with space and E, I just switched the buttons between screenshots.

    Here's what I'm working with for the dialogue:

  • This is backwards:

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

    Hm I switched them and there's still the same issue. Everything works perfectly until the very last line of dialogue.

  • You can attach a *.c3p with the problematic scene.

    I ended up switching the player movement to 8-direction, and it fixed the issue when I added your original fix to it like I did with tile. It works better for this anyway, but I'm not sure why the tile movement was so clunky in comparison.

  • You need to change the collision collision of the hero. Collision collision with furniture and map details should be equal to his shadow.

    Good point; that does make a lot more sense. But after changing this the issue still remains for all of the spots shown in the original images.

    I even went ahead and made the character not solid as well as no collisions enabled for them, just to see, and it didn't change anything. Now I'm even more confused haha

  • The collision polygons I have for these sprites seem way, way off from what they should be. No idea what's wrong here, but I've linked some examples below.

    The first three images show areas I can't enter due to solid collision. I'm holding the direction I'm facing in each of them. The last image shows the collision of all sprites. Collision for the beds is a box sprite the exact size of each of them.

  • After trying to find an answer for a while, I've come to the conclusion it's 100% the dialogueTrigger failing to work if more than one function is called above it. I'm still not sure why it's acting up like this, though.

  • Is it possible you are creating multiple dialogues and only seeing the top of the stack? The debugger might show that kind of thing? That is what I would check for next.

    yours

    winkr7

    Hm I checked that and didn't see anything extra, just the single dialogueTrigger

  • Is dialogue a global variable right? You set it to 1 after the first call, is it getting checked somewhere? Show all your uses of that variable, that is where I would look first.

    yours

    winkr7

    The global dialogue variable you're talking about is there to prevent the characters from using their walking animations during a dialogue moment, and isn't connected to the dialogue event sheets outside of that. Removing that doesn't seem to fix the issue either way. Here is what that variable is referring to:

  • I have a dialogue system that works as I want it to, but only when it triggers a single line of text. If I try adding a second line to show up afterwards, separately, it breaks.

    I hit space once to start the dialogue, a second time to move to the other dialogue (it still works here), and the third time I hit space to destroy it and finish, it breaks. It seems to only break at the end of the dialogue however. So with 4 options, the first 3 work fine.

    When it works (1 dialogue):

    Character is locked in place

    Dialogue box is destroyed after a button press

    When it doesn't work (2+ dialogue):

    Character can move freely with the dialogue box still open

    Dialogue box does not destroy unless the character moves around away from the trigger

    Screenshot attached. Thank you for any help!

  • I fixed it by adding a variable requirement to the keyboard events that are linked to the animations, but let me know if there is a cleaner way to get to this point. Thanks!

  • I have a setup where two characters are on screen. I just finished the parts needed to switch between them at will and everything works as intended.

    The only issue is that both characters continue playing their walking animations after switching between them (or in this case just changing the direction they're facing). I am using keyboard inputs for this.

    Is there any way to prevent character 1 from playing any animations, while allowing character 2 to do so and vice versa when switched? Thank you! Screenshot attached.