Why does 'create object' spawn 3 objects?

0 favourites
  • 6 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • I want it to spawn just one.

    here's the capx

  • Ahhh, I see why. The seed bounces! <img src="smileys/smiley4.gif" border="0" align="middle" />

    You have it set so that it grows a sapling when it collides with the ground; it just so happens that it hits the ground and bounces twice, resulting in THREE saplings instead of one.

    SECOND edit: Wait a minute, I didn't even look at that "Next" variable. That does the job I just described before... Oh, the problem is that you should add 1 to Next BEFORE the "Wait 1 second" action. Then it works.

    Edit: I gotta say, I'm curious about where you're going with this project. Mind throwing us a few details? <img src="smileys/smiley2.gif" border="0" align="middle" />

  • Yeah for sure, to be honest, I'm not really sure how to get it to work, but essentially I'm trying to create a game where you start as a seed and it sprouts at the forest floor, the goal being to grow large enough to reproduce. There will be a light source at the top that needs to touch you in order to fill up your energy/mana bar, and once you've filled it up, you're allowed to grow up by one 'stem', similar to how snake works when you eat a piece of food. the 'sapling' sprite would always be at the top, and you would use the arrow keys to aim the sapling which would slowly drag the rest of the plant (which consists of a bunch of joint-connected stems) toward the light, while the base is connected to the immobile seed.

    I can't figure out how to get the stem to grow from the seed and keep the sapling at the top. Seems like a pretty complicated idea so I might give up on it : (

  • So I've decided to keep at it, and I've made substantial progress. I've figured out how to make the stems attach/stack to each other and only be able to bend a certain amount, I've added a rough night/day cycle and the basic energy system (i haven't looked into the actual line-of-sight sunlight-to-leaf system yet).

    I seem to be having the same issue as before with sequencing events. I'm trying to make it so that when you push the spacebar to grow after filling up enough sunlight energy (you start out with enough energy from the seed for 3 growth spurts), that a new stem pushes out from the seed and the sapling stays at the top. Could you take a look and see what I'm doing wrong? I'm so confused.

    CAPX

  • although I suppose it would make more sense for the new stem to grow from behind the sapling than to come up from the seed...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Unfortunately, I have just about zero experience using Construct's physics engine, so I'm not really sure what's happening there. <img src="smileys/smiley5.gif" border="0" align="middle" />

    I'm sure someone here could help you out, though.

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