nikolatesla20's Forum Posts

  • Ya, it's probably because wait doesn't act exactly like a "wait here entirely" - its more like "wait here in this chain of events" - allowing other events to continue. I actually thought about what you mention, to instead have a global variable tracking time and react to that.

    Thanks all, just have to understand better how things fit together

  • haha guys, ya, I do have some waits under my first condition, because it's an "intro" set of animations that play to sort of show the player the beginning story plot. So it's probably the waits that cause any later empty conditions blocks to just execute in parallel instead of "waiting" for the entire first condition to finish.

    It's ok, just have to learn a different way of thinking.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • @ossyrag The array sounds like it may be a way to do it, I'll look into that area and see how to handle arrays of sprites, thanks

  • @AllanR - I actually had tried that, but it didn't seem to work like I thought it would? Instead of running the actions sequentially it ran them in parallel. So in other words, it ran the block under "FirstTimeStarted=1" AND ran the blank block at the same time, whereas I wanted that blank block to ALWAYS run, but if the conditional ran, then I wanted to blank to run AFTER it..so, sort of like an "inline if" so to speak.

    I'll give it another try though

  • You don't even need to vary the distance between the platforms during a speed increase, because if you simply spawn new platform at regular intervals, say, every 1 second. Well, if the ground is moving faster, then everything moves faster, and moves across the screen faster. But the spawn rate is still every 1 second. Which means that the distance between platforms will increase AUTOMATICALLY because the speed the platforms are moving is faster then the spawn rate, and keeps getting faster than the spawn rate.

    Bear in mind this is if you spawn platforms as it goes - if you have a pre-made level you'll have to do it some other way.

  • Well, I had already solved the first if/then by using a function. Just doing an empty condition doesn't work because it will run "in parallel" to the actions that have the condition, instead of sequentially.

    I actually did read the event based documentation already, just more was checking if someone knew of some quick way to do it that I didn't think of

    And regarding creating from a Family, I don't need help creating from a family, what I wanted to see is if there was some way to add new object TO a family itself during runtime, so that picking randomly from a Family now had a larger range of objects than it did when the game started.

    If not, then I'll just have to code more random % routines is all.

  • Hi,

    Man, construct 2 is AWESOME. Loving it so far. Many times when I'm in the editor and wondering - "can I do this?" it shows the creator thought about it already! I love for example when you rename something it automatically fixes the names anywhere it's referenced.

    I have two questions though that I wanted to know

    The first one, is how to do a "proper" if / then. The problem I have sometimes is I have a sub event, and I want actions to run there, but I want ONE of the actions to depend on another condition. So essentially, halfway through the list of actions, I want one of those (or up to 3 or 4) to run under a flag. So say I have "FIRSTTIMESTARTED=0"..I want to run "On beginning of Layout", and run some actions, then another set of actions IN SEQUENCE, I want to run only when FIRSTTIMESTARTED=1, then continue running the rest of the actions after that.

    In normal programming that would look like this:

    if (layout started)

    {

    do something

    do something

    if (FIRSTTIMESTARTED==1)

    {

    do some more stuff

    }

    do rest of stuff

    do rest of stuff

    }

    With the "event based" system Construct 2 has I haven't found an easy way to do that other than put the "do rest of stuff" in its own function, so it can be called from two different places ..basically I want things to run in order, but some of those things only run if a second condition is true, below the first condition.

    Another thing I would like to see is the ability to add things to a family at runtime? For example I have an obstacle generator that right now uses "System.PickRandomInstance" and it picks from a family. This works great. But I'd like to make it so over time in my game I can add additional items to the family at runtime, that way it can act sort of like a "level up" type of thing - over time, the obstacles can get more complex.

    I think you can work around both of these things but just wondering if it's already possible in some easy way and I'm not seeing it.

    Thanks.