Ashley's Forum Posts

  • 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!

  • Ah, thanks, nice snippet. Added to next build.

  • It's worth posting your browser with your framerate - Chrome and IE9 are the only ones that do hardware acceleration at the moment AFAIK so don't be surprised if you don't hit 60fps on Firefox or Safari. However, I tried the Firefox 4 beta and that seems as good as IE9 too!

    Noga: I also noticed a bit of "shaking", it's Chrome that seems to integer-round canvas coordinates - IE9 doesn't do it though. I guess it's another thing Chrome will fix.

  • There are no sound effects - sound is something I'll figure out another time...

  • Note: if you downloaded the 32-bit version before this post, please re-download - I forgot to update some of the Javascript.

  • Edit: Also, I can't open the cap in R27, it, for some reason, is complaining that AbsoluteX is not an expression of the Mouse object.

    Oops, think I messed up the 32-bit build. One tick...

  • Thought you might be interested to know: in the latest release (27), the 'pick nth instance' system condition allows for a good way of working around the 'collision picking' issue. The problem usually is in the event 'Sprite collides with Sprite' (both objects the same), how do you make actions to affect just one of them?

    Pick nth (which is 0 based, like everything else) in subevents can solve this:

    <img src="http://www.scirra.com/labs/collisionpick.png">

    Hurray, no more "how do I pick that instance" problems

  • As mentioned in the r27 thread, there's a new demo (along the lines of the old 'rain demo') here:

    http://www.scirra.com/labs/ghostbustinghtml5

    You can get the .capx (for r27) here.

    I thought I'd get some feedback - is it working properly in everyone's browsers? Especially interested in Mac and Linux users. Also, do you think it makes a good demo? Anything wrong with it? Thanks!

  • 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:

    Sprite.Health

    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 )

    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!

    Changelog

    • [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
  • You do not have permission to view this post

  • Yes, the MDC (MDN?) is a great reference - if you're googling a query, adding mdc works well for good results.

  • You do not have permission to view this post

  • Irbis: you could have phrased that a little more gently...

    xzalion was previously banned for some time and signed up a new account. Now I remember why I banned them! Cheerio!

  • I don't get this hygiene-extremism. We comparatively recently evolved out of scratching a living from mud, rocks and caves. So people are actually pretty robust. That's why monkeys aren't dropping dead because they don't shower every night. I don't think a bit of this or that in the water supply is going to be the end of the world.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • WebGL won't be considered until Microsoft commit to supporting it in Internet Explorer, which it seems may be unlikely.