Edit Image points

Get help using Construct 2

Post » Wed Feb 20, 2013 6:28 pm

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 :)
Krish
Hey! Did you know that you can hire me to make your games?

Click Here to See More
B
21
S
6
G
5
Posts: 391
Reputation: 5,627

Post » Wed Feb 20, 2013 9:34 pm

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.
B
45
S
15
G
9
Posts: 1,096
Reputation: 11,038

Post » Wed Feb 20, 2013 10:32 pm

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.
B
16
S
6
G
2
Posts: 152
Reputation: 3,764

Post » Thu Feb 21, 2013 2:46 am

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.
B
14
S
6
G
3
Posts: 71
Reputation: 3,811

Post » Fri Feb 22, 2013 7:51 am

@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.
Krish
Hey! Did you know that you can hire me to make your games?

Click Here to See More
B
21
S
6
G
5
Posts: 391
Reputation: 5,627


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 20 guests