the.sand's Recent Forum Activity

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

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

  • Ah okay.

    I really want to trigger this (and other) actions on the start of any layout but there doesn't seem to be a trigger for this. Is there one?

  • I've double checked and it is using the correct event sheet.

    Here is a link to my game file if you don't mind taking a look: drive.google.com/file/d/1ngS6ldw6lmu6gQmtYx-3yKLeyjdmpW2D/view

    You can switch between two layouts by walking inside/outside the house.

    Thanks!

  • Thanks for your response!

    What's weird is I am using "on start of layout" function to stock the default items. And even though both layouts are using the same event sheet the items still get destroyed and don't get re-stocked when I switch layouts.

  • Hi all,

    I am currently storing the player's inventory in an array and displaying their inventory in a bar at the bottom of the screen.

    On start of my game I trigger an "itemPickUp" function so the player is stocked with their default items. The problem is when i switch layouts, these items get destroyed. They are still stored correctly in the array but I'm not sure how to draw them again to the screen.

    I was hoping "on start of layout" would trigger on start of any layout but this is not the behaviour.

    Is there a way to trigger an event on start of any layout? Or is there some better way I could be doing this?

    Thanks in advance for your help!

  • Thanks! oosyrag dop2000

    That was exactly what I needed to know!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I was hoping I could use:

    distance(Tilemap.TileID(1282).x,Player.X,Tilemap.TileID(1282).Y,Player.Y)

    But Tilemap.TileID is not a real function.

    Is there some way to do this that I'm missing?

    Thanks!

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