Spawning objects based on location clicked

0 favourites
  • 5 posts
From the Asset Store
Advanced inventory mechanics for your RPG game (Array-based). Take Items, split them, pick up them, read the description
  • https://drive.google.com/file/d/1KScx2o6n2FdBc5WnTq3Tqiuk1nHgr5zl/view?usp=sharing

    Hi,

    I am making a farming game and I'm running into an issue where I only want to spawn an object based on the "Plot_Check" that I click.

    I have an object "PlantableArea"(Multiple of the same) that sit on top of a "trigger" called "Plot_Check"(which is in a family with other Plot_Checks)

    When I click on the Plot_Check it spawns an object at each of the PlantableArea's.

    Currently it spawns it at every instance of PlantableArea. I only want it to spawn on the PlantableAreas based on the Plot_Check that I click.

    So if I click on Plot_Check1, PlantableAreas on Plot_Check1 spawn objects and PlantableAreas on Plot_Check2 spawn nothing.

    How do I achieve this without having to check each Plot_Check?

    File is at top of post.

  • This here is your biggest problem

    On left click on plotChecks(Family) needs to have Spawn corn go to plotChecks not to plantable area

    You are essentially telling the system I am talking about this specific clicked on plotChecks, but then not saying to do anything with it on the right side.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This here is your biggest problem

    On left click on plotChecks(Family) needs to have Spawn corn go to plotChecks not to plantable area

    You are essentially telling the system I am talking about this specific clicked on plotChecks, but then not saying to do anything with it on the right side.

    Thanks winstreak That did seem to do the trick. But it only spawns one object, where I would like it to spawn on each PlantableArea.

  • I miss understood what you had in mind. I feel like you make your code extra confusing by using a different plot for each spot.

    Here is how I would do it:

    youtu.be/gwFV3cw6Sr0

    You will have to edit a bit of code but you wont have to deal with families and multiple Plots.

  • Thanks winstreak ! I appreciate the video! I will give it a shot.

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