How do I get a crop to grow?

  • Hey Construct world. I'm still way new to this and am almost finished with the monster/player tutorial. What I'm trying to put together is a little different than a shooter style game. I'd like to put together a farming style game and wasn't sure how to go about that. Things like crop planting, growing and harvesting. Any idea if this is possible with Construct? If so, any advisement on where to start?

    Thanks everyone.

    Tagged:

  • For timers during runtime, you can use the timer behavior, or an instance variable to keep track of time.

    For keeping track of time when not playing, the unixtime expression will give you a number relative to a fixed point in history.

    You may want to familiarize yourself with "states". Using instance variables, an object can have different states depending on different conditions.

    If you place an object, it will be in the growing state, can't be interacted with. After X amount of time, it will be in a ready state, which you can harvest and or do whatever else you want with it.

  • Brilliant! I figured there had to be a way but needed someone with knowledge way beyond mine to point me in the right direction. I'll try it out and let post back what I find.

  • Sure you can !

    Build for fun (at very very very simple startup), one second = one day, the crop rise

    https://www.dropbox.com/s/4javgfekt19pvrg/Crop.c3p?dl=0

  • Thank you for the reply and information/file! Testing now to see what questions come up.

  • Sure you can !

    Build for fun (at very very very simple startup), one second = one day, the crop rise

    https://www.dropbox.com/s/4javgfekt19pvrg/Crop.c3p?dl=0

    Very well done! Is there a way to "harvest" the crop once it has fully grown? I guess it could trigger a new sprite to be created. Is that the right method?

  • Try Construct 3

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

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

    You need a new Sprite (farmer ?), and…

    Improvisation, but :

    When Farmer is overlapping Crop, if Crop.AnimationFrame is last, if a Key is Pressed, then Play Animation Harvest, Add 1 Crop to Bag, Remove Current Crop…

    You see the point ^^

  • Sure !

    You need a new Sprite (farmer ?), and…

    Improvisation, but :

    When Farmer is overlapping Crop, if Crop.AnimationFrame is last, if a Key is Pressed, then Play Animation Harvest, Add 1 Crop to Bag, Remove Current Crop…

    You see the point ^^

    Testing now! Genius idea.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)