[Suggestion] Object Scale Expression

Discussion and feedback on Construct 2

Post » Sat Sep 28, 2013 6:46 am

I noticed that you can Set Scale for objects, but when I want to call upon that scale value - say, when comparing two values - it tells me there's no expression available for it. I'd surely love to see that added. Thanks!
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
142
S
24
G
8
Posts: 793
Reputation: 15,157

Post » Sat Sep 28, 2013 1:32 pm

Objects don't have a single scale. If it's twice as wide and half as tall, what should the scale return?
Scirra Founder
B
403
S
238
G
89
Posts: 24,648
Reputation: 196,133

Post » Sun Sep 29, 2013 12:55 am

@Ashley - Ah...good point. I didn't think of that. I was having trouble isolating scale values based on what layer the object was on, so it SEEMED to make sense to have a scale value of the object, itself.

What about an expression that returns the scale that the object is on at that time? I see you put in expressions for the layer name and number, but not the scale value, itself. Could that work?
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
142
S
24
G
8
Posts: 793
Reputation: 15,157

Post » Sun Sep 29, 2013 12:24 pm

Aren't there already expressions to get that information?
Scirra Founder
B
403
S
238
G
89
Posts: 24,648
Reputation: 196,133

Post » Tue Oct 01, 2013 7:11 am

@Ashley - Eh, kinda. I mean, for the layer, yes. But what I was trying to do was get info about the layer based on the object that is on that layer. (Sorry if that's just making the matter more confusing.)

Ultimately, I'm working on creating a "smooth zoom" feature as the object moves up and down floors/layers (in a top-down view). Hard to explain now, but I wanted the scale of the object (assuming it was 1) to be the target scale value as the other layers scaled in or out. But I'm coming to a better understanding of scale and layers, etc, so all this is probably amounting to nonsense as I try to explain it. LOL

I'll be posting a help request, though, because I've got the very thing I was aiming for to work in a test capx, but not in my game, even though I copied it 99% identical (the conditions had to change slightly).

Thanks for your input!
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
142
S
24
G
8
Posts: 793
Reputation: 15,157

Post » Tue Oct 01, 2013 8:11 pm

You can give the object a .scale variable, and set that as well when you set the scale. That's what I've been doing.Arima2013-10-01 20:12:00
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Post » Tue Oct 01, 2013 8:15 pm

@Arima - *facedesk* Once again, another obvious solution evades me.
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
142
S
24
G
8
Posts: 793
Reputation: 15,157

Post » Tue Oct 01, 2013 8:19 pm

Happens to all of us. :)
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876


Return to Construct 2 General

Who is online

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