Set imagepoint + 50 on X

0 favourites
  • 4 posts
From the Asset Store
Three 50 by 50-pixel tile maps for your 2d platformer games
  • Hi

    How can I spawn object i Imagepoint 4

    and align it +50 pixel to the right on X

    /Flemming

  • Use a variable to hold the position info. Example:

    1) Declare variables xPoint,yPoint

    2) Pick object that has the imagepoint 4 you want to use (otherwise you can't access that info)

    3) xPoint = PickedObject.ImagePointX(4)+50

       yPoint = PickedObject.ImagePointY(4)

    4) Spawn object at xPoint,yPoint

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi thanks for reply

    1) Declare variables xPoint,yPoint

    Ive created these global variable

    2) Pick object that has the imagepoint 4 you want to use (otherwise you can't access that info)

    Cant find the pick object event ?

    3) xPoint = PickedObject.ImagePointX(4)+50

       yPoint = PickedObject.ImagePointY(4)

    4) Spawn object at xPoint,yPoint

  • There are a number of ways to pick the object, but they're also picked automatically after spawning them. So in your example, just spawn the object that contains the imagepoint you want to use to spawn something else. So for example:

    1) Declare variables xPoint,yPoint

    2) spawn objectName (which contains imagepoint 4) at whatever XY you want

    3) xPoint = objectName.ImagePointX(4)+50

       yPoint = objectName.ImagePointY(4)

    4) Spawn second object at xPoint,yPoint

    Or, am I completely misunderstanding you and you just want to spawn the object centred on its own imagepoint 4?

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