How do set position of an object to other object imagepoint

0 favourites
  • 3 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • hi,

    Can anybody help me please,

    how to set the position of an object to another object image point. where his condition like this, the object (1) are pieces of the object (2). I would like if the object (1) collision with object (2) then the object (1) position to the image point of the object (2). on the object (2) I have created a list of image points, the list is meant to fill the object (2) of the pieces of the object (1).

    to more easily this a picture from my project :

    if you want the example capx file, maybe you can write your email in the comment below, then i will send it to you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you can do this very easily by simply doing a Sprite.ImagePointX(ImagePoint) on the X-coordinate and Sprite.ImagePointY(ImagePoint) on the Y coordinate.

    the ImagePoint needs to be changed to either the index value of your chosen image point, or by using the name. Note: If you're doing it by name, it needs to be EXACT and you need to set " before and after the name, inside the ()

  • Hi Condolent,

    I have just tried this imagepoint as you suggested and it worked fine for me thanks for that, but i have another problem..

    I want my ball to jump from one platform to other platform and these platforms are of different widths, but I want these platforms to spawn with equal distance (irrespective of their widths)..Can't attach my capx because this is my second post..so here is what i did

    GLOBAL VARIABLE platformspeed= 300

    System every tick --------platform.X - platformspeed * dt

    platform1.X - platformspeed * dt

    platform2.X - platformspeed * dt

    Player Set x to 500

    So my platforms are moving and I gave Platform behaviour for my Player and Solid behaviour for the base. I don't want the player to move left/right so I kept X of Player to 500 every tick..

    So for spawning platforms /base I wrote

    System Every 2 seconds -- System create object platform1

    X= platform3.ImagePointX (0) + 655

    Y= 600

    So by this, I was able to spawn platform 1 after platform 3, but basically what I need is

    1. I want to spawn random objects not platform 1 or platform 2 etc..

    2. I want them to spawn at equal spacing, (but each platform widths are different)

    I'm using free editon of construct 2, so i can't use families here..so any suggestion?

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