the.sand's Forum Posts

  • 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.

  • 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:

  • lionz the instance variable does stay correctly but the action that sets the height of the meter based on the instance variable always resets the height.

  • Hi all,

    Currently I have a function that, when triggered, is supposed to reduce the height of a stamina bar. The problem is that after the function runs, it returns to its previous height.

    The way I have this set up is that the bar has an instance variable "stamina" that gets reduced by X amount and then it sets the height of the bar based on this variable. But, again, the height always resets after the function runs even though the variable number has been reduced.

    I can make it work by using the "every tick" action but I feel like that action takes an unnecessary amount of memory just to track stamina.

    What am I doing wrong here?

    (Thanks in advance for all your help)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • InDWrekt

    Wow I did not understand how powerful families can be.

    Thanks so much!

  • Hi all,

    I am trying to find a way to pick all sprites that share the same instance variable. These sprites will have different names but the instance variable string will be identical.

    The reason I would like to do this is so I can use a function to pick all sprites with this variable and modify them.

    Is this something I can do? Or am I going about this in the wrong way?

  • Hi all,

    I'm building a farm sim and I am trying to find a way so I can change all of my "watered" tiles into "not watered" tiles every time the character starts a new day. The way I imagine this working would be to check for all instances of tiles that have the id of 1322 (watered) and change them to tile id 1282 (not watered). So what I would need to be able to do is select all tiles with the tile ID 1322.

    Is there a way for me to do this?

    Tagged:

  • I figured it out!

    They actually were there they were just being hidden behind the inventory because for some reason when you switch layouts it changes the Z order. Weird...

    But anyway it's working. Thanks for your help!