Beta versions are not as thoroughly tested as stable

Beta versions are not as thoroughly tested as stable

Beta branch

Construct 3 r311

Hide instance variables; chooseindex expression; fixes for Safari 16

21 September, 2022 ()

Email Me New Releases

Don't miss out on the latest and greatest new features in Construct 3

Create an Account

Notes

This release adds a new Show in Properties Bar option for instance variables. This can be unchecked to hide the corresponding property in the Properties Bar. This can be useful for instance variables that are only used in event sheets - there's no need for those to be listed for object properties, and so you can tidy up the list a bit by hiding the ones you don't need to show there.

There's also a new chooseindex system expression, which lets you return one of the following parameters from a zero-based index. For example chooseindex(1, "foo", "bar", "baz") will return "bar".

We also have a batch of bug fixes, and worked around two bugs in the latest Safari 16 update. In particular if you were having trouble with Remote Preview in iOS 16, it should be working better now; if you still have issues try clearing your browser cache and then try again.

Like this Release?

Let us know with a thumbs up!

31
Launch r311

New Additions

15 favourites
Instance variables: option to hide from Properties Bar
17 favourites
System 'chooseindex' expression

Bug Fixes

9 favourites
Platform: could sometimes teleport if running downhill in to wall
6 favourites
Possible crash pasting layouts referencing families
8 favourites
Physics: incorrectly handled resizing with non-centred origin
6 favourites
SpriteFont: TextHeight did not always correctly handle scale
6 favourites
Layout view: wrong layer names in context menu options
5 favourites
SVG Picture: did not work with files in subfolders (regression r310)
7 favourites
Work around Safari 16 bug that broke Remote Preview
7 favourites
Work around Safari 16 bug that broke music playback

Language updates

5 favourites
Enable zh-TW (aka traditional Chinese) language by default

Scripting updates

5 favourites
Add SpriteFont textWidth and textHeight properties

Share Construct 3 Release r311 Now

  • 20 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • We should be able to fold/unfold those hidden variables directly from the Properties View too. It can be useful to just remember/see all the variables the object has but also quickly edit them.

    Also I still strongly believe the Properties View/Instance Variable worklow needs a lot of enhancements : construct3-21h2.ideas.aha.io/ideas/C321H2-I-348

    Possibility to Right Click a variable in the Properties view to edit Variable/add a new variable directly from Properties/Find all references.

    Press F2 to rename selected variable name in the properties view (instead of changing its value)

    Also I know that now it's unlikely to happen but Instance Variable Folders (+ some kind of Tree/"Hierarchy"" view for Instance Variable in the Properties) would have solved this hidden/runtime variable issue in a better way + would cover even more use cases. For example for a Weapon Object. We could have 3 Variables folder: Weapon Settings/Bullet Settings/Hidden Variables.

      • [-] [+]
      • 1
      • Ashley's avatar
      • Ashley
      • Construct Team Founder
      • 1 points
      • (2 children)

      We already get far more feature requests than we can possibly act on. Further, you can always take any specific part of Construct, and suggest dozens of improvements, or even radical overhauls. As much as I'd love to do it all it's just impossible with the resources we have.

      For example the current approach of hiding instance variables is pretty simple and was straightforward to implement. Adding more UI controls to expand and collapse stuff makes it more complicated (I don't think we've developed a suitable UI control, and so we'd need to make one; developing new UIs is particularly time consuming), and raises usability questions (why did you hide it if you want to show it again?). So usually we have to be pragmatic about it and do something fairly simple but still useful, and then move on to the next thing.

      • Regarding the enhancement suggestions : It seems like adding the rightclick context menu to Instance Variables from the Properties View (the same as the one in the Variables pop up) seems fairly simple to achieve while the benefits would be huge in our worflow (Add var/edit var/Find all refs easily and for any family of an object directly from Properties). I edited my suggestion to remove the Variable Folders idea and keep only the Properties View enhancements. No need to open the ObjectType Instance Variables popup anymore or even worse to find the corresponding Family in Project View to only then open its Family Instance Variable Popup for extremely common stuff.

      • Regarding why showing Hidden Variable again ? Because I like to use Properties View as a cheatsheet for all variables of the Object/Family i'm working on in Eventsheet and also because i really dislike the Variables popups workflow (don't want to open/close it every minute to check some stuff inside or hide/show stuff again and again). If it's impossible to achieve I understand but I just provide the feedback I won't use the hide feature at all as a user because of this even if most of my variables are runtime only. But it's fine it will probably be useful for other dev.

  • I love the hide instance variables feature, makes organisation a lot easier, especially with instance vars that are for runtime only!

    I'm just a bit confused why you cannot hide/unhide them by clicking the eye icon though. Hope that comes in the future for better ux. :)

      • [-] [+]
      • 6
      • Ashley's avatar
      • Ashley
      • Construct Team Founder
      • 6 points
      • (2 children)

      Nothing else is editable in that list which is why clicking the eye icon did nothing... but it makes sense, so I added that for the next beta.

  • BUG: Sprite with default (Physics Behavior) and a few animated frames. Physics gravity drop is very slow with lag. Remove animated frames and sprite falls as expected.

    Works correctly in r310 and under. Only happens in r311 on all old projects and brand new blank projects with only 1 sprite/physics.

    I do not have time to submit a bug ticket. I am sure others will complain about this soon.

  • BUG: Sprite with default (Physics Behavior) and a few animated frames. Physics gravity drop is very slow with lag. Remove animated frames and sprite falls as expected.

    Happens on all old projects and brand new blank projects with only 1 sprite. I do not have time to submit a bug ticket. I am sure others will complain about this soon.

  • An issue with the scroll behavior and the timeline. If the X initial position is outside the screen, the animation X position is disturbed.

    • [-] [+]
    • 1
    • Fib's avatar
    • Fib
    • 1 points
    • *
    • (3 children)

    Is there a specific example where chooseindex function is really useful? I can't think of any use case for it.

    • Yeah i can't think of any use case either. Don't understand why this one was implemented immediatly after being suggested without gathering any vote while there is so much features a bunch of people ask and that would be really more useful.

      For example a really simple one even if it looks like a dumb one : BBoxCenterX, BBoxCenterY, (+ViewportCenterX, ViewportCenterY, LayoutCenterX, LayoutCenterY ?) would be great QOL and are some of the top requested feature on the platform. We can't make our own utility function for those BBoxCenter that works with all objects, it would only work with specific families and pick by UID.

    • chooseindex enriches the usage of choose. But There is difference between chooseindex and tokenat, tokenat only needs to pass in 1 string as a parameter, while chooseindex needs multiple parameter, Their usage scenarios are very different.

      ▶ choose

      choose("Hey, how are you?", "Welcome!", "Nice to meet you!", "Hi, come in.")

      ▶ chooseindex

      chooseindex(int(random(4)), "Hey, how are you?", "Welcome!", "Nice to meet you!", "Hi, come in.")

      ▶ tokenat

      tokenat("Hey, how are you?;Welcome!;Nice to meet you!;Hi, come in.", int(random(4)), ";")

      ▶ ternary operator

      variable=1 ? "Hey, how are you?" : variable=2 ? "Welcome!" : variable=3 ? "Nice to meet you!" : variable=4 ? "Hi, come in." : ""

      ▶ Array

      Array.At(0, int(random(3)))

      ---------

      chooseindex(int(random(3)), array1.at(0,int(random(3))), array2.at(0,int(random(3))), array3.at(0,int(random(3))))

      • [-] [+]
      • 1
      • DiegoM's avatar
      • DiegoM
      • Construct Team Construct 3 Developer
      • 1 points
      • (0 children)

      The expression was implemented because of this suggestion construct3-21h2.ideas.aha.io/ideas/C321H2-I-438

  • Thank you so much for taking up the hidden instance variables suggestion. I agree that collapsing them would be a nice feature too, but this is still a super helpful way to handle them and will really help organize things.

  • Possible to add Opacity in the hierarchy system ?

  • Ah so basically chooseindex using 2 parameters. More like straight version of tokenat. Nice addition.

  • I was here