No "Check Scale" Condition

0 favourites
  • 6 posts
  • So I can set an object's scale, but then I can never reference it's object scale directly because there is neither a Condition nor an Expression for an object's scale.

    it really seems like a simple enough thing to add an expression for (since you can set it, I'd assume half the code is already there anyway)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So I can set an object's scale, but then I can never reference it's object scale directly because there is neither a Condition nor an Expression for an object's scale.

    it really seems like a simple enough thing to add an expression for (since you can set it, I'd assume half the code is already there anyway)

    The problem is: when you change the aspect ratio, what that expression should return?

    The correct way to do it in C2 is to set an instance variable to the value of the scale you want, then to scale the sprite to this value.

  • This question comes up from time to time. My counter question is: what should the scale return if the object is twice as wide but half as tall?

  • This question comes up from time to time. My counter question is: what should the scale return if the object is twice as wide but half as tall?

    A single scale value would be impractical because as you point out, changing the objects proportions would completely mess up the scale, so...

    How about having 2 scale values ?

    In your example it could be something like:

    X Scale = 2.0

    Y Scale = 0.5

    Is something like that viable?

  • It just seems weird to me that you can WRITE to the scale, but can't READ it.

    And the above solution seems viable.

    Also Aphrodite, that's what I ended up doing. It just seems like a needless workaround, much like the "fake global bool using 0/1 int" thing.

  • Well, it's already very easy to get the scale on each axis, just divide the width/height by the original width/height.

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