GeometriX's Recent Forum Activity

  • Yup, menu/title screens and new levels are (generally) created in separate layouts.

    In the free version you can have unlimited layouts, but only up to four layers per layout.

    The option is here:

    <img src="https://dl.dropbox.com/u/14522925/C2%20examples/new-layout.jpg" border="0" />

  • There's no way to pre-play the particle effects, so Sushin is right - you'll have to find a workaround.

    Is it always snowing in your game? Would you say that it's snow-themed? If so, I'd suggest that you make your snow particle system global (i.e.: it's not destroyed between layouts) and place it in your initial title screen (just mock one up for the sake of testing if you don't already have).

    Actually, thinking about it now I'd say you could even generate the particle system while the game is loading. If you'd rather not have it look like it's there, then just set it to invisible. Read about custom loading screens here.

  • I think what GameThirsty means to say is that you should put all of your UI elements into their own layer, and set that layer's parallax property to 0,0. Details here.

    You should really read at least a few of the basic tutorials before charging off into your own project. If you ask for help, the expectation is that you've read them and have a basic understanding of these sorts of things.

  • Oh, okay I get it. NaN is what happens when you attempt to write a "" value from WebStorage to a number variable, which I assume is what's happened to you here.

    I can't find any way to check for NaN, so I recommend this: You first need to send a value to WebStorage before you can retrieve from it. I suggest using a global variable (CurrentScore) and only recording to WebStorage at the end of each level, and only pulling in your score from WebStorage when you load a saved game instead of trying to pull it actively right at the beginning of the game.

    A global variable will keep throughout your entire play session, so you don't need to actively write to and read from WebStorage the whole time.

    Either that, or initialise your WebStorage keys - just set them to "0" on layout start.

  • There is an action that compares the value of variables, if that's what you mean?

    So, like:

    CurrentLevel = 1 -> do all of these sub-events to create these monsters every whatever seconds

    CurrentLevel = 2 -> do all of these sub-events to create those monsters every whatever seconds

    etc.

    I'm not sure exactly what your code looks like because you've chosen a really small snippet, but if I were to guess I'd say you wouldn't even need to use while.

  • I don't think there is a built-in null function, but you could just check if the value of a key is "" or not. Since a key must be created with a value of at least "" (it can't be blank), that's as close to null as you can get.

    I.e.:

    System -> Compare two values -> First value: WebStorage.LocalValue("key"); equal to (or not equal to); second value: ""

    Otherwise, there is an action to check if a key exists or not.

  • I've never experienced this. I use Chrome for 99% of my testing (I know, that's probably not a good idea), and this hasn't come up for me before.

    So it could mean your Chrome is out-of-date, or there's some weird bug/incompatibility in your game, or there's an actual bug in C2 or Chrome.

    Could you post your capx, or attempt to replicate the issue with a simplified example?

  • trim("Hello My Name Is John")

    Manual entry on system expressions

  • This isn't a bug.

    When you use apply the physics behaviour to an object, any other motion you give it directly conflicts with the physics. You're basically telling C2 "this object is bound by the laws of physics", and also "spin this object because I said so" - which are conflicting messages.

    First, you should use the "apply torque" action to rotate your lab instead of simply rotating the sprite. But this requires that you set immovable to no, which is obviously a bit of an issue because the lab would collapse to the ground. I'd suggest that you create a new, invisible or visible, non-collidable object (a "pin" so to speak) and bind the lab to that with a revolute joint. Set the pin to be immovable, effectively trapping the lab in place but allowing it to rotate freely.

    You should also alter the density of your sand and lab objects to better represent their approximate mass in the real world (so the sand doesn't "push" around the lab).

    Here's an updated capx for you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is something I've had to deal with a number of times, and for the life of me I can't figure out how to do it. In the past I've resorted to certain objects being made up of nine different collision boxes to get something workable, which obviously isn't appropriate for every situation.

    If anyone can offer advice, I'd gladly listen to it, too.

  • ome6a1717 Post your capx so we can take a look.

  • BluePhaze, oh, right you are then. Didn't realise that was what you meant.

GeometriX's avatar

GeometriX

Member since 23 Aug, 2012

None one is following GeometriX yet!

Connect with GeometriX

Trophy Case

  • 12-Year Club
  • x2
    Coach One of your tutorials has over 1,000 readers
  • x2
    Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies