VikasSanstha's Forum Posts

  • It's quite simple. Add Timer behavior to some static object on the layout, or create an invisible sprite for that.

    Run this action once, for example in "On start of layout" event:

    Sprite Start timer "spawn" for 1s (regular)

    If will trigger "Sprite On Timer" event every second, which you can use to spawn hearts.

    Thanks very much. I have it working. When I do it this way, with create as opposed to spawn, am I not creating instances? When I set it to spawn it was making copies as they were falling.

    I can see it's much more effective than every x seconds, easy to pause, etc.

  • Allan, I have really been struggling trying to figure out how to execute the "create a heart every X seconds" by using a timer object instead of the every x seconds action. I would greatly appreciate any assistance.

    This is part of a bigger game where I'm using a lot of the every x seconds commands, and they are not behaving well with game restarts, etc. I know I need to be using timers, but I've struggled with it, and I haven't found good examples as it relates to spawning.

    Many thanks for any assistance.

  • this is how I would do it...

    https://www.rieperts.com/games/forum/onlyHearts2.c3p

    I made it so that you can only select each color once, but it doesn't have to be that way.

    Thanks so much Allan! This is fantastic, and so much more concise than I even thought possible. Pick by evaluate was exactly the kind of functionality that I was saying to myself "this is what I need - a combined pick instance and compare state." I've never used it or frankly even noticed it, so that's a revelation, I will have to become much more familiar with it. Even more awesome is the picked count, which is a system expression I take it. That will be incredibly useful for the kind of content I create (educational games). Thanks again.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've updated the link. Thank you.

  • Hello friends, this is a piece of a larger game I'm working on. I have it working fine with separate objects, but I know I should be using instances and variables, or instances and then doing it entirely through animation frame matching. I have tried and tried but I can't get it working using either of these approaches. It's easy enough using the method I am using here, but it's very annoying that I'm not doing it properly. Any help is greatly appreciated. Thanks

    dropbox.com/s/fzjekbw5asvzyat/only%20hearts.c3p

    Basic mechanic:

    1) Hearts are created and drop using physics

    2) There are empty (faded opacity) heart slots at the top

    3) Upon clicking the falling hearts, they are matched by animation frame, and the ones at top become fully opaque

    4) When all are matched, it resets

    Also, I'm sure there are other and perhaps better approaches to marking them as "achieved", both individually and when all have been achieved - booleans, etc. I'm open to suggestions for sure. I just settled on using opacity since it was easy.

    Tagged:

  • Hi Wixey, I fleshed out Oosyrag's project file a bit. as it's the kind of work I'm interested in for my school. Here's a project file. Thanks

    dropbox.com/s/bsaaxkptisedsg3/Replicate%20Order.c3p

  • Thanks for this. I would like to start doing more of this. Get closer to real programming. This is helpful.

  • That works, thanks, it's good to understand how to do it both ways. Thanks for the replies.

  • I'm not sure what that would look like. I've tried this before, using the object's expression, but it doesn't work. Thanks for the feedback.

  • Hello friends, this is the method I have devised to click endlessly on a sprite and cycle through the animation frames in order (not randomly), looping back to the beginning after the last frame. I'm just wondering if this is the most commmon, "correct" way to achieve this. It seems to work well and is simple enough.

    Many thanks for any input.

    Tagged:

  • Just wondering if there is a technical roadblock to autopopulating things like effect names (when writing actions for "set effect enabled/disabled", etc.) and set group name activated/deactivated. Currently things like this require that you reference the name in question and type it in.

    There are more examples but those are a couple that come to mind. It would definitely make C3 more user-friendly and efficient.

    I think one of the real strong points of the C3 UX is how many values are passed along throughout the software, and options lists thereby autopopulated. It's really great, and it's so inclusive that it's a bit jarring when you come to the few settings that are not handled this way.

    Tagged:

  • Did you change it to loopindex as I mentioned because it works for me. You can run the project in debug view, there you can see the variables and such for each instance.

    Sorry, I see you meant just loopindex and nothing else. I was just removing the +1 but keeping the array.At.

    Yes, it does work! Wow, I'm encouraged and frankly amazed that I was so close otherwise. This was way over my head and my real current ability level, so I'm actually thrilled that my overall approach was valid except for this part.

    Thanks a lot for your help! Much appreciated.

  • Thanks Lionz for the input. This helped with the second problem of the win action happening all the time, but the main mechanic still doesn't work.

    I am continuing to work with it, but I feel like I'm going in circles. I suspect that something is wrong with the list positions, but I can't check them since they are generated only when the program runs.

  • Hello friends,

    I'm trying to build the foundation for a learning game with this functionality.

    1. Separate text blocks are generated from an array, and randomly placed around the layout.
    2. The separate text blocks when taken as a whole create obvious sequences (e.g. 1,2,3, etc. or A,B,C, etc.)
    3. The user must click each one in the correct sequence to win.

    I seem to have parts 1 and 2 working, though perhaps not in the most proper way, I don't know. But I'm hung up on step 3. I know how to do this "click the items in order" functionality in a vacuum, but when combined with the random generation of the text from an array I can't get it working.

    I'd greatly appreciate any guidance. Here is the project file.

    dropbox.com/s/zvtgavehvezvgiy/Ordering%20texts%20arrays.c3p

    Many thanks!

  • Can you post the code? Because my pc is crap but construct 3 works like butter on my pc

    Not C3, only the typewriter text function. Other functions like Physics that are undoubtedly mmuch more CPU intensive work fine.