6bf85f30-2578-4227-841b-41a0007077df's Forum Posts

  • Move the ones not being used off screen when not visible.

    With this option, when I export the game to play it other platforms (like the web?), what happens to those objects? I guess they are still there, just out of sight? Does that tie up system resources?

  • There are a few ways.

    You could give them all a variable, and use it for the pick condition.

    Use a pick criteria, is visible.

    Move the ones not being used off screen when not visible.

    (probably a million more ways, but one of those should work)

    I know this will sound dumb but do you have a tutorial on either idea as my simple brain isn't getting it and any guide would be a help. Thank you in advance.

  • Very clever ideas. Gives me something to think about going forward.

  • Greetings everyone. Hope all is well.

    I'm sure there is a trick to this that is escaping me at the moment. On the 3 layers I have worked on, the menu buttons line up and when one is pushed, even though the other layers are hidden, they conflict.

    How do I code that? And besides hiding them, is there some other option to make them disappear until they are needed to reappear?

    Thanks in advance for your time.

  • When they select the unit to spawn you can store that as a variable. When they select Yes you have conditions against that variable to spawn the correct unit, you'll also need to use the store block ID again to spawn it on the right block.

    I appreciate your time/insight. If you can think of a tutorial that would help me with that process, I will gladly do the legwork of researching and studying it. I get the theory but not the execution.

  • Hey experts. In the game I'm building, you can build a mine or oil pump. Currently if the block already has a mine or oil pump built (instance variable = 1), then the player is prompted with a warning that a structure already exists, would they like to replace existing structure (yes and no buttons appear).

    If they select no, menus/buttons become invisible and they play on. However I'm struggling on the "yes" portion. If they select oil pump, get the warning and select "yes", the instance variable = 0 but I can't get the oil pump to be built unless they select the oil pump again.

    How do I program it so if they select the structure, select yes on replacing existing structure that they don't have to select the build option again?

  • Thanks friend! Guess what I'm enabling "now".

    Beats me trying to remember to save every few minutes on my own.

  • .....and I guess that means there is no way to recover it. Sometimes the answer is no but I appreciate the confirmation.

  • Hey everyone. Funny situation. Worked in IT for 18'ish years and have always emphasized to users that they need to save docs, files, projects constantly (leaning towards the cloud). Was working on a game for 4+ hours yesterday in Construct 3 when I realized I hadn't saved in a while. Selected "save" and browsed to a folder I created in Dropbox. Hit ok and in a second, Construct closed out and just like magic, 4+ hours of my life went poof.

    So, is there any chance, somewhere in Construct there is a place where unsaved data goes if the app closes down unexpectedly? I'm thinking something similar to MS Word sometimes saving a doc as a tmp file that you can get back.

    Figured I would ask before I started over. I was able to recreate the issue by opening Construct, starting a new project and saving it immediately to the same Dropbox folder which caused Construct to shutdown again.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey everyone. I figured out how to get the sliderbar to reflect the value of a variable however once the slider is set, I need to transfer that number to a different textbox/SpriteFont. I've tried different buttons and other combinations but to no avail. Any suggestions?

  • You should use global variable for this. What are you trying to achieve with the instance variable?

    I have 10-12 objects (crops) that are "growing". Every second, the system increases the local variable (growth) of each object so that when it hits 100, it can be harvested.

  • Hey all. I asked a question about increasing the value of a global variable and it was resolved. Now I'm curious how to increase the value of a local instance variable (LIV) when the layout is changed. If the LIV is on layout 1 and the view is switched to layout 2, the LIV on layout 1 stops increasing.

    How do you program for this? Thanks everyone.

  • Add your Every Tick increment to event sheet 2 also.

    Brilliant!! Thank you!

    Now, what about a local instance variable continuing to increase on layout change?

  • Hey all. In some instances, instead of using multiple layers, it was recommended to use different layouts. So I opened up a new project and started testing how to do this.

    I have two layouts (1 and 2). On layout 1 is a global variable that increases every tick. When I click a button on layout 1, layout 2 loads and when I click another button on that layout, I return to layout 1. However when I return to layout 1, the global variable hasn't increased. How do I keep this value increasing?

    https://easyupload.io/heg4js

    I uploaded the project so you could see how it was configured. Eager to see how this can be done. Thanks in advance.

  • Well firstly in this situation where levels are involved, I would use a separate layout instead, or at least destroy the old level upon transitioning to the new. If I needed to preserve the level to revisit later, I would definitely use a separate layout.

    If in the case of a menu and clicking, I usually have the "layer is visible" condition in the menu events.

    ..........

    D. Don't use a layer like this to begin with (ie. destroy and create objects as needed instead of just making them invisible), or move to a different layout instead.

    First I have to say, thank you for being incredibly level-headed, taking the time to offer an explanation we could understand and doing so without flexing your vast knowledge. You’re a rare blend and earned my respect (and that of others I’m sure).

    Second, when it comes to layers needing to be invisible and/or using tags for multiple layers so objects aren’t clickable versus using a new layout, this is where I’m so confused.

    I’m using one layout because in the game, I have objects “growing” (crops with a global variable increased in number until it reaches 100 which means it’s ready for harvest). If I use a second layout, those crops stop growing and are reset when you get back to the layout they’re on. I don’t know how to keep them growing when layout is switched so I just use different layers to display alerts, options and menus.

    I really did appreciate your reply and the length provided a lot of information I could follow. Plus, you did it without being condescending! Thanks for the information and I’m hoping you’re willing to offer some insight to using multiple layouts while allowing certain objects to continue to increase in value.

    I’d love to use different layouts so that I used invisible layers properly. Heck I’d even use the tagging method you mentioned if I had some guidance.

    You provided some great options/solutions and if you’re willing to show how (or throw some links out to those guides that could help us), you’ll further your legendary status.

    Thank you again for your time and insight.