"For Each" on Container Not Producing Same Results For Each Object

0 favourites
  • 5 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • The two images here are the event sheet line items and a screenshot of the results during a preview.

    I have three objects in a container:

    Spring_Pole (silver gradient object)

    Spring_Board (red & white 3D object)

    Spring_Trigger (yellow square)

    In the preview screenshot, the Spring on the left has all three components correctly aligned.

    But the Spring on the right has the Spring_Trigger not lining up with the Spring_Board properly.

    Since they're all in a container, I'm doing the For Each condition line. I have verified that the angles all are as they should be...it's just the position of the one Spring_Trigger object that won't line up properly - it should be just to the left of the Spring_Board.

    In the layout, I only have the Spring_Boards (two of them) as I expect the Pole and Trigger will auto-spawn for each Board.

    What am I missing? Any suggestions?

    Thank you for your help.

  • Usually you don't need for each for object container. Instead set the action directly to respective other object container.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Usually you don't need for each for object container. Instead set the action directly to respective other object container.

    Normally, I would agree and have thought the same thing. But I've found that that doesn't always seem to be the case. I've had a hard time discerning when I do and don't need to specify literally for each container instance.

    Sadly, the problem persists. The second container group (the one on the right) doesn't all line up correctly.

  • Let me check it for you. I don't have good eye but probably good at spotting something.

  • alextro - Whatever tests you were running, I thank you. I think I got it figured out now. For one, definitely "programmer error". I was forgetting to add a "+180" to the "set angle" actions which didn't help orientation.

    It also seems the order of the actions (setting the angle before the position) seems to have made a difference. Tis odd.

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