the.sand's Recent Forum Activity

  • dop2000 Oh that does work! I don't know why I thought it didn't yesterday...must have done something else incorrectly.

    Thanks again for all your help! Saved the day again!

  • Hey dop2000 thanks for looking into this!

    I see what I was doing wrong was passing items.uid instead of stone.uid so this does work for specific instances but I wonder is there a way to do this with families?

    For example when my character collides with anything from the "crop" family, it doesn't know specifically which crop it is picking up until it sorts it into the inventory so I don't say carrot.uid, artichoke.uid, I can only say crops.uid but I just tried this and it doesn't seem to work.

    Any thoughts on this issue? Or does this method just not work with families?

  • Hey dop2000 I did try running in debug mode and the boolean seems to be set correctly. For testing purposes I have my "stone" items set up to be stackable, and my "wood" items to not be stackable.

    Here is a link to my project file if you feel like taking a look: drive.google.com/file/d/19UZv_z6WOANSNEDxOCatcf-061sgZf40/view

    I appreciate all your help!

  • Hey dop2000 Thanks as always for your help!

    I tried adding a parameter and passing in the items UID by passing in items.UID into a paramaeter called "UID". I then make the first step "items, pick by UID", before sorting by the stackable boolean. Unfortunately this doesn't seem to work either.

    For some reason it is treating them all as non-stackable now, even when I have the boolean set to true for some of the items.

    Here is a screenshot of my updated config.

    Any ideas about what might be going wrong here?

    Thanks in advance for your help!

  • Hi all,

    I am encountering a weird issue with my "pickUp item" function. Basically all my items are in a family called "items" and this family has an instance variable which is a boolean called "stackable". If the item has stackable set to true, then I want it to go down a specific path in my function so it may stack with any of the same items that are already present in the players inventory. If this boolean is false, I want it to go down a different path in the function and take up a slot of its own.

    So how I've done it is when the function is called the first thing it does is evaluate this boolean and based on this it should send the item down one path or the other...but this isn't happening.

    No matter what the boolean is set to, the item goes down both paths. It seems that the function is ignoring this check entirely.

    Here is a screenshot of how the function is set up.

    I have no idea why it would be ignoring this boolean check. Any suggestions of things to try? I've been trying to figure this out for a while and really need it to work.

    Thanks in advance for your help!

  • dop2000 InDWrekt Thank you so much for this helpful information. I clearly misunderstood the nature of global layers. I was able to solve my problem because of your wonderful sage-like advice.

    Thank you thank you 1000x thank you!

  • lionz Hmm point taken. I'll see if I can do that.

  • Hi all,

    I've noticed that my sprites, which are on a global layer, still lose the values that have been set to their instance variables when I switch layouts.

    Is this how construct works by design or am I missing something?

  • lionz Yah it does doesn't it.

    But basically when the player enters their house they can click on the diary to go to sleep and the game then starts the next day. It's this end of day action (which happens inside the house) that checks to see which crops outside of the house (and thus on another layout) are overlapping a "watered" tile to know if they should progress through their growth cycle or not. Fun farm sim stuff.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • lionz I need the collisions enabled so that certain sprites can detect if they are overlapping.

  • Hi all,

    I have some sprites that are set to global (and need to be for various reasons). My issue is they are appearing on other layouts. I understand this is just the nature of global objects but I am wondering if anyone has any clever tricks for hiding these sprites?

    I had considered just setting them to "invisible" but then they will still be collidable and the player may run into these invisible objects.

    I had also considered moving them to some very distant position but I'm not sure how I would ensure each one would return to its original position.

    Has anyone come up with a clever method for hiding global objects on other layouts?

    If so please let me know.

    Thanks in advance!

    Tagged:

  • Hi all,

    Currently when the player picks up an object it creates the sprite inside their inventory. I need to create the sprite (and not use animation frames for the inventory) for several reasons. What this also means is that if the quantity of the object = 0 I need to be able to destroy it.

    Since I want to destroy any object that could be in the inventory slot I need to be able to destroy by name by passing its name into a function. Unfortunately this action doesn't exist in Construct 3.

    Does anyone know how I can destroy an object by its name?

    Tagged:

the.sand's avatar

the.sand

Member since 12 Aug, 2020

None one is following the.sand yet!

Trophy Case

  • 4-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • RTFM Read the fabulous manual
  • Email Verified

Progress

7/44
How to earn trophies