# Scale/Resize independent of origin?

Discussion and feedback on Construct 2

### » Tue Dec 06, 2016 5:20 pm

R0J0hound wrote:Only "scale" is used in the set height expression. It's actually the same as if you squished the height with it scaled around the origin. The only thing that changes when you scale from a different point is the object needs to be moved.

Right, so which action do I need to use to be able to "squash" a sprite from an image point rather than it's origin?
B
41
S
12
G
14
Posts: 1,124
Reputation: 11,286

### » Tue Dec 06, 2016 5:51 pm

The actions are a set position and set size action using the equations I linked to. I'll have to defer to someone else for further discussion or perhaps alternate solutions.
B
94
S
33
G
128
Posts: 5,488
Reputation: 81,539

### » Tue Dec 06, 2016 6:11 pm

R0J0hound wrote:The actions are a set position and set size action using the equations I linked to. I'll have to defer to someone else for further discussion or perhaps alternate solutions.

Sorry @R0J0hound I'm trying not to be stupid, I just couldn't quite work out where to put those equations! And I still can't figure it out!
B
41
S
12
G
14
Posts: 1,124
Reputation: 11,286

### » Tue Dec 06, 2016 6:47 pm

I'm probably just explaining it poorly. Here's an example of it if it helps.
https://dl.dropboxusercontent.com/u/542 ... ottom.capx
B
94
S
33
G
128
Posts: 5,488
Reputation: 81,539

### » Tue Dec 06, 2016 7:11 pm

R0J0hound wrote:I'm probably just explaining it poorly. Here's an example of it if it helps.
https://dl.dropboxusercontent.com/u/542 ... ottom.capx

Thanks for the example! Now, can an object have it's position manipulated if it's being pinned?
B
41
S
12
G
14
Posts: 1,124
Reputation: 11,286

### » Tue Dec 06, 2016 10:03 pm

My sprites pinned, can I move it's position in it's pinned somehow?
B
41
S
12
G
14
Posts: 1,124
Reputation: 11,286

### » Wed Dec 07, 2016 4:55 pm

It doesn't appear possible to reposition a sprite if it's pinned, but it's okay to scale it?
B
41
S
12
G
14
Posts: 1,124
Reputation: 11,286

### » Wed Dec 07, 2016 5:25 pm

Pin locks the position, so you'll probably need to unpin it first, then re-pin after repositioning.
B
94
S
33
G
128
Posts: 5,488
Reputation: 81,539

### » Wed Dec 07, 2016 5:51 pm

R0J0hound wrote:Pin locks the position, so you'll probably need to unpin it first, then re-pin after repositioning.

Which is tricky if it's the character animation! Is there another way of repositioning?
B
41
S
12
G
14
Posts: 1,124
Reputation: 11,286

### » Wed Dec 07, 2016 6:24 pm

The only solution I can think of would be to not use pin and implement something like pin with just events. But that can be tricky as well.
B
94
S
33
G
128
Posts: 5,488
Reputation: 81,539

PreviousNext