Define image points or change origin point location

Get help using Construct 2

Post » Fri Mar 28, 2014 1:18 pm

Can I set a different image point or a different location to origin point of a sprite when the layout starts?
B
74
S
13
G
4
Posts: 1,005
Reputation: 8,053

Post » Fri Mar 28, 2014 1:59 pm

As far as I know this can only be done in the editor and not through events, but I might be wrong..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Mar 28, 2014 2:00 pm

@RenatoB, You can't change image point locations in runtime,
what is this for? There's probably another way to do it
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Fri Mar 28, 2014 3:04 pm

@keepee: I plan to use a single sprite in various layouts but the origin point will change for each layout because the grid measurements will change too.
B
74
S
13
G
4
Posts: 1,005
Reputation: 8,053

Post » Sat Mar 29, 2014 11:26 am

UP
B
74
S
13
G
4
Posts: 1,005
Reputation: 8,053

Post » Sun Mar 30, 2014 1:38 pm

Please. I still need a solution for this. Thanks.
B
74
S
13
G
4
Posts: 1,005
Reputation: 8,053

Post » Sun Mar 30, 2014 1:56 pm

Change animation frames.
You do not have the required permissions to view the files attached to this post.
B
83
S
32
G
23
Posts: 121
Reputation: 15,041

Post » Sun Mar 30, 2014 3:15 pm

@Kastas: Thanks, but I can not use this solution because my sprites already has many frames. Apparently I have to change each of the sprites separately. I thought there was a logical solution for this.
B
74
S
13
G
4
Posts: 1,005
Reputation: 8,053

Post » Sun Mar 30, 2014 4:25 pm

RenatoB wrote:@Kastas: Thanks, but I can not use this solution because my sprites already has many frames. Apparently I have to change each of the sprites separately. I thought there was a logical solution for this.


So clone animations and change them at the start. Unless you use several animation for the sprite already. In that case add variables.
You can apply image point automatically to all frames of an animation.

Image
You do not have the required permissions to view the files attached to this post.
B
83
S
32
G
23
Posts: 121
Reputation: 15,041

Post » Sun Mar 30, 2014 4:56 pm

The formula is:
x = centerX + cos(angle) * distance
y = centerY + sin(angle) * distance
Image ImageImage
B
169
S
50
G
174
Posts: 8,322
Reputation: 110,788

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests