[size=150:8xwocf4o]Download Construct 2 public preview 27
[size=85:8xwocf4o]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: http://www.scirra.com/labs/ghostbustinghtml5
(.capx file here
). That proves you can make more complicated games now
(doesn't look like we're leaving the ghosts and busting mixture for demo games any time soon
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