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

  • First you draw your bar and position it on the screen (Obvious).

    Then, in Every Tick, you put the formula (TotalCornStored/TotalCorn)* max bar size (Height or width).

    It is recommended to use the lerp command to have a smoother transition.

    Definitely appreciate your suggestion however I'm pre-newb. When I use this, the blue progress bar just ping pongs.

    + System: Every tick

    -> System: Set TotalCornSpace to int(TotalCorn)-int(TotalCornStorage)

    -> CornStorageBar: Set progress to TotalCornSpace

  • C3 guru's, thanks for checking out this topic.

    As I make my way through this first game, I've set 10+ global variables for different things I need to reference in the programming. All told, I have probably torn apart several games to see how they run and noticed most don't have a lot of global variables but many dictionary entries instead.

    So my question to those that know C3 inside and out, what is the better path for a game (maybe I'm not asking the right question).; using dictionary entries and calls or global variables?

    Thanks in advance for your time.

  • Hey C3 world!

    I'm looking into progress bars to show how much "space" is being used by inventory. If there is 10 slots open and you've used 5, I'd like to show that in a half-filled progress bar that was dynamic.

    How would I reflect that in the programming?

    I envision it to look like (instance variable "TotalCorn" - "TotalCornStored" = "TotalCornSpace") where totalcornspace would be reflected on the progress bar.

    Thanks in advance!

    Tagged:

  • You do not have permission to view this post

  • Found them:

    1) Board, event2, you have create tile instead of create chess!

    2) FSM-match3, event6, you have match3.callback in quotes, but it's a variable, so there should be no quotes.

    3) FSM-prepare, event1, same problem, you have Function.Param(0) in quotes, it's a variable, so no quotes!

    From someone that posts questions on here and am at the mercy of someone as generous and knowledgeable as you, thank you!! You keep our confidence in C3 high. I wish there were more accolades we could give you.

  • You do not have permission to view this post

  • Thank you both for your replies and suggestions. I'm an old tech guy and after reviewing a game like Demonorie and studying the tutorials, I realized I am trying to run before finding my legs. Best to study more of the Construct world, get a better feel before getting more frustrated and filling up the forum with silly questions.

    I appreciate everyone's kindness and time.

  • Hey Construct world!

    Looking for tutorials or guides to setup objects that have to be "bought" in game. I've searched as much as I could and didn't find anything that I could use.

    Thanks in advance for your help!

  • in your previous post, you are checking CornCrops Overlapping CornCrops. That should be CornCrops overlapping PlacementLocation

    I'm sorry, just not smart enough to figure it out. If you have time to explain, I uploaded my cp3

    https://www.file.io/download/uVwPwMX2K4qv

  • I would give the PlacementLocation an instance variable "Filled" or "Planted" and set that when you plant something. Then before planting anything else check if that it set. Clear it when you harvest.

    I believe you are right and am going back to rework it. Invaluable insight, I appreciate it.

  • in your previous post, you are checking CornCrops Overlapping CornCrops. That should be CornCrops overlapping PlacementLocation

    I would place the code to set the Animation frame in the event that increments the growth variable since that only runs every second. The way you are doing it will work fine, but it has to calculate the frame every tick (60 times a second) and it wont be changing that often. The less unnecessary work you do, the faster your game will run (and use less battery if you are aiming for mobile).

    Thanks for catching both of those and how to fix! Going back to it.

  • Spoke too soon. So I can somehow select corn which triggers the corn to show up and if I click the field again and select strawberry, it will also show up with the corn. When I click the field a third time and select either corn or strawberry, then anything there is destroyed and whatever I selected shows up.

    How do I prevent two items showing up? I've been testing to prevent having to waste your time with a silly question but it's gone from fun to frustrating and I need any available help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you will probably want to add a TimePlanted instance variable, or maybe a countdown variable until the plant is full grown...

    I like the way you think! Here's what I have for that..

  • I think I got it!! Building off of your explanation, I used the existing family and tweaked the programming.

    Boom! Before I get too excited, is there any potential issue with that??

  • you have the PlacementLocation and CornPlant2 reversed in the final event where you want to destroy the CornPlant2 instance.

    the way you have the event condition makes it "pick" PlacementLocation instances, but you want to pick CornPlant2 instances. So your Destroy CornPlant2 action destroys all of them since all are picked by default.

    so saying CornPlant2 is overlapping PlacementLocation will pick the instances you want since you already have the correct PlacementLocation picked.

    I would put all crops in a family, and give the family an instance variable called Location, and assign that variable when the crop is spawned. Then you can pick crops by their location.

    I appreciate the explanation as it helps me learn C3!

    Testing now, will update accordingly.