0 Favourites

Edit Image points

  • Hi,

    Is it possible to edit / add /subtract from image points of a particular sprite using the event sheet?

    I wanted to set image points dynamically based on certain events... or say if I'm loading a sprite from URL, I wanted to set origin point to exactly center or 100 px away from center on Y-axis.

    I tried to look but couldn't find.

    Anyone?

    Thanks :)

  • Hi,

    you cant do that to my knowledge but you could create a sprite with multiple frames, each frame could have the required image points.

    Then just select the frame you need. Not totaly dynamic i know but it might help.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Hey Krish. I don't think there's a way to do that, other than maybe writing a custom plugin or something.

    If you're looking to adjust where the sprite/image appears, you could possibly adjust the X/Y position. If you wanted it 100 pixels to the right you could set it's X position +100, for instance. I dunno if that's what you need, but positioning is easy to manipulate in that case. Also, you might be able to use the Pin behavior in conjunction with an invisible sprite and have the object you want to manipulate keep a position relative to your invisible sprite.

  • Maybe try setting the image point of the image to image.ImagePointY(0)-100. That would set 'image point 0' to be 100 pixels to the vertical. If the event was triggered by the mouse click, as long as you held the mouse button down, the image would stay 100 pixels above where it used to be.

  • dinofun

    How is that done?

    I see a Set X or Set Y .. but dont see a set imagepoint on actions of any sprite.

    spaceape spongehammer

    Nah... I'm using array tiles to generate maze maps here.

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