How do I destroy only one object and create only one?

0 favourites
  • 6 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Okay, so hi all :3, im new and i'm trying to create a game with a farm element with it.

    but i got 2 problems that it seems that I cant solve.

    the first one, when I "plant" seed in a crop, I can plant as many as I want, how can I create only 1 per crop?

    the 2nd problem is when I 'collect' (destroy) the seed (on his last frame) he will collect all the other seeds no matter what frame they in, as long as one of the seeds are in the last frame.

    kinda hopeless.

    When I create the seed on Ctrl key.

    When I 'collect' (destroy) the seed

  • 1st screenshot is blank on ctrl event and not demonstrating what you are saying

    2nd screenshot should be trigger event player on collision with seed. If the seed must also be in animation frame 4 then you add this as a condition with this event picking the seed object and animation frame=4.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1st screenshot is blank on ctrl event and not demonstrating what you are saying

    2nd screenshot should be trigger event player on collision with seed. If the seed must also be in animation frame 4 then you add this as a condition with this event picking the seed object and animation frame=4.

    So how come Ctrl works? like i click cbtrl and he summon a seed?

  • You don't have any logic connected to pressing ctrl in that screenshot. Must be somewhere else.

  • You don't have any logic connected to pressing ctrl in that screenshot. Must be somewhere else.

    my bad, there was smthing, I thought i showed it, this is the full pic, still have the same problems

  • You mean if there is already a seed on the crop you don't want to create more? You can give the crop an instance variable, when you create the seed, you set the instance variable to true. On the left conditions where you have player is overlapping crop you add another condition 'crop instance variable is set to false'. This blocks out creating another seed if you already created one.

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