Why won't my objects get differentiated?

1 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • So, I'm working on a 2d factory building game inspired by Factorio, Shapez and Satisfactory. I have two families: "Conveyors" and "Objects" (objects being Iron Ore for example).

    My code goes like this:

    if Objects is overlapping Conveyor

    and

    Conveyors angle = 0

    do

    Objects | Simulate Control TileMovement pressing Right

    (same code for other conveyor rotations)

    Now for a reason I cannot understand, this works perfectly with 1 Object type. As soon as I have 2 Objects on 2 different conveyors that are facing different ways at the same time, both objects move in the same direction!

    I've been trying to figure this out for days now and nothing seems to work.

    Could someone please explain what I have wrong?

  • Use "For Each" as the first condition. This will run the other events for each object in the family that meets the conditions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Welp, I feel dumb af now. Thank-you very much for dealing with my ape brain

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