[Solved]Change offset overlap in 1 mirrored instance...

0 favourites
  • 3 posts
  • This is the link to the capx. Please download it and have a look if you may.

    https://www.sendspace.com/file/44kj1r

    This is bugging me out of my skull.

    I am spawning 2 boxes each 3 seconds.

    On is on screen left and one is on screen right.

    Now both are the same instances of 1 box. The box on the left is mirrored once it is created.

    I have an "offset overlapping" on the main box used to check the collision.

    Now here comes the problem.

    When I mirror the box on the left, the offset overlapping is not mirrored but remains on the same side that the orignal offset overlapping

    How is is possible to change the offset so that its "offset overlapping" is on the opposite side in the mirrored box instance?

    There are 2 conditions that I need to remain:

    1) Both boxes need to be of the same object type, and they need to be 2 same instances like they are now.

    2) The mirror must be done like it is now. Rotate 180 degrees cannot be used, because I need to use a complicated formula which has several different global variables: set X=self.x+....etc formula and not: move forward x+....

    In other words it is the same problem I am having in most of my prototypes from the beginning while using Construct2, I cannot no matter what I do, change the value of 1 instance when the instance is created by events instead of being placed by hand.

    I tried using families and the family instance variable, but changing that from the event sheed changes all the family instance variables for all the object which is really a shame, because if it was possible to manipulate some values of instances using family instances it would be a very very powerful feature.

    If I change the family instance, all of the offset collision changes for all the instances in the scene.

    I would be glad if someone help, so I can stop pulling out my hair.

  • I'm not sure if you understand overlapping at offset..

    Because your example adds the x-position of the object to the value of the offset, it behaves strangely..

    Offset is calculated from the current position of the object, so for my example I just used 200px..

    https://dl.dropboxusercontent.com/u/485 ... ffset.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • LittleStain

    Yeah for the last 15 minutes it occured to me that something was off with the way I was using the offset value...

    Thanks for pointing that out!

    Next time Ill make sure to do some more reading on the function itself... and not waste peoples time.

    Sorry for the trouble and thanks once again for the help, I appreciate it!

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