Download Construct 2 release 27

0 favourites
From the Asset Store
Casino? money? who knows? but the target is the same!
  • Download Construct 2 public preview 27

    Link to release 26.2

    New to this build: instance variables - formerly 'private variables'. In programming, 'private' tends to mean 'hidden from access so only the owner can use it'. That's not really accurate for Construct, so this build calls them instance variables. I know some of you might not like it because it's different from 0.x, but I do think it's better for beginners, since it more obviously suggests the variables are stored for each instance.

    You can add and remove instance variables from the properties bar like in 0.x - but the edit variables dialog is now modeless, which means you can continue changing stuff in the layout while it's open. Also, the expression syntax is now different - if 'Sprite' has an instance variable 'Health', you access it simply with:


    This mean you can't name an instance variable the same as an object expression, like X or Angle, but I don't think it's a problem - you can just use a different name, and the syntax is much easier.

    There are a couple of known issues:

    • The new boolean variable type seems to have a few bugs - I'd avoid using it for now, just use a 0/1 number.
    • You can't move variables up or down the list - this will be added in a future build.
    • There's a bug where creating/spawning a new object gives it the initial values of a previous object. The workaround is simple: simply use a 'set instance variable' action after creating a new object, and it works correctly. This will also be fixed though.

    I need to have a break for a while because I've been coding like hell for a couple of weeks and mad busy with the C2 public preview launching - and I'm on the final year of my degree! I need to get back to that, so I'll probably leave everyone to play with instance variables for a bit. At least now you can make something reasonably worthwhile. Speaking of which, there's a new demo: (.capx file here). That proves you can make more complicated games now )

    Don't forget you can also pledge money toward features now - and if you like Construct 2, spread the word, tell some people about it!


    • [FEATURE] Instance variables (see above)
    • [ADD] System condition 'Pick nth instance'
    • [ADD] System expressions 'distance' and 'angle'
    • [ADD] Added Fundry as an option to the pay-what-you-want page
    • [ADD] Mouse.AbsoluteX and Mouse.AbsoluteY (doesn't take in to account scrolling)
    • [ADD] ScrollX, ScrollY system expressions
    • [FIX] Sprite: 'On collision' should trigger and pick instances correctly
    • [FIX] Sprite: 'Is overlapping' should run and pick instances correctly
  • Note: if you downloaded the 32-bit version before this post, please re-download - I forgot to update some of the Javascript.

  • Wow, some very nice additions in this release! Will try it asap.

  • Agreed, the additions are really nice! =)

    I like the way variables are handled now. If you know your variables then I think this'll help people speed up their workflow. What would make it even greater is if we somewhere down the line (not immediately obviously) could maybe get some intellisense thing going where you type in "Sprite." and you get a list with the available expressions and variables.

    One thing I appreciate that I'd like to point out is the ability to place the event sheet view and layout view side by side. I can finally work like this! =D

    This was in the first preview release and I'd thought to mention it earlier, didn't turn out that way though.

    Great stuff!

  • Yep, very nearly 60fps on my older computer. Nice.

  • Instance variables - and live's getting better

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So excited

  • Love the new syntax, thanks!

  • Not sure if something is wrong, or I'm just not getting it right.

    Seems sure there's something wrong with the method Ash mentioned for instance variables.

  • Can you please remember to post what you expect to happen and what you actually see happen instead? I'm looking at your file and it looks like you want to make a chain of objects... but I'm not sure... The 'for' is inclusive so it might be looping one too many times and if you accidentally access outside the range of sprites with sprite(n).x, then it will wrap around and pick the wrong object. Some comments and a description of what you're trying to do wouldn't hurt!

  • Yes thats pretty much what I was going for, but I was more concerned that the individual variables were all being changed.

    What I was expecting was that the first instance sprite(0) would keep its initial value in sprite.num.

  • OK, that's uncovered a few bugs, but the main problem is Sprite(n) indexes to the currently picked objects, so after a 'pick nth' there's only one instance picked, so no matter what n is you always get that instance's value.

    That can be worked around, but it seems inconvenient, so in the next build Sprite(n).X indexes to all instances, and ignores the SOL. That also means Sprite.X is no longer equivalent to Sprite(0).X, you'll always get the first instance's X with Sprite(0).X.

  • [quote:2xitiiar]indexes to the currently picked objects

    Ahh that's where I was messing up.

    I was going on the assumption it was indexed on creation.

  • Sprite(n) indexes to the currently picked objects[/i > Might there be a way to do both? It seems it would be helpful to have it reference only the currently picked objects with a 'sprite collides with sprite' event.

  • Referencing a sprite by specific variables in actions might solve a few things.


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