brushfe's Forum Posts

  • You'll need to learn a little more about "picking" in Construct. It's really powerful, and a big part of the engine. In this case, it's what you'll need to isolate the bullet you want to destroy. Check out how to use "for each" in particular.

    To solve the problem, you can give your bullet object a number variable called bounceCount and starts at 0. The event could look something like this :

    For each bullet

    On bullet bounced

    -> add 1 to bullet.bounceCount

    .... -> if bounceCount = 2

    ....... -> bullet: destroy

  • Additionally, I believe the Touch plug-in registers Mouse clicks. So if you follow oosyrag's way of capturing input you won't need the OR Mouse.

  • What winstreak shared is right, step one is adding an Else to the "Off" condition.

    However, this code is still checking the value of ReduceMotion every single tick. As long as it's "Off", it's constantly restarting the animation of Coin and Cloud — meaning it's displaying Frame 0 of those animations over and over and over.

    So your code, in a way is working: it's starting the animation. But it's starting it every single tick, and will never leave Frame 0.

    You need to find a way to check this code periodically. Ideally, you could put this code in a Function, and call that function whenever the ReduceMotion variable changes.

  • Could you share a screenshot of your code?

    Chances are you're running the command every tick, versus once, but it'd be easier to help with a look at what you're up to!

  • I have the same issue, but no solution.

    You should submit it to the bug tracker, with instructions on how to reproduce the error, so it can be investigated properly.

  • Hey jobel, I was curious about how to do this as well, and took a shot at it. See if this project file is useful for you!

    drive.google.com/file/d/1iGHAfTcqPZI1DBLR9wVgsc3_lqIW-mwX/view

    EDIT: Click on the squares to set the "level" to complete/incomplete. Then you can click save, reload the preview, and see that the complete levels are saved.

  • brushfe

    As of the latest beta, r286, there is a new option you can use in the configuration file. Adding the "use-raw-folder-names" property with a value of true will make the importer use the folder names as they appear in the imported files.

    DiegoM Amazing! Can't wait to try it out.

  • Oh right - if it helps, you might have to turn off "Show profiles for this display only" on the bottom of the Color tab. It should give you a long list of profiles to choose from.

  • It has to do with the way picking works.

    Actions always try to apply to one object. Without a condition, an action has no way to pick an object, so it applies to all objects.

    But when you add a condition, the action gets some instruction. If the condition could be satisfied by multiple objects, it picks one at random. Adding "for each" forces the actions to repeat for each object that satisfies it.

    So in your top event, the function is only picking one random Sprite uid. If you add a "for each sprite" on that subevent, it should call the function three times.

  • Hey TiredSundew5639 — I was the one who'd posted that bug report. If it helps, I found a way around it (but still hoping the bug gets fixed in OSX):

    I think it may relate to the colour profile; here's what I did to get things working:

    • In Chrome: visit chrome://flags/#force-color-profile and changed the options to "sRGB"

    • In OSX display preferences: change the colour profile on all monitors to "sRGB IEC61966-2.1"

    • Restart the laptop

  • Haha true... I know I get caught up in trying to find the most 'elegant' way to do things, when it makes zero difference to performance.

    I'm glad it's all sorted!

  • I think that's your answer then! It doesn't look like the "On created" trigger occurs with objects already placed in the layout.

    If you already have the Obj_Object on the layout, you could change your "On Obj_Object created" trigger to "Trigger Once while True". This should fire the spawn of Obj_ObjectAbove.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've tried out the first "Doesn't Work" code in your screenshot, and it seems to work fine. There might be another part of your code interfering.

    Here's the C3P

    drive.google.com/file/d/1mjCUbwdunQRdHaSdxoz7dWnTdfhJIANg/view

  • Almost. The condition is a string and it's an OR.

    Global string = Text

    YourVariable = "Five"

    OR YourVariable = "Eight"

    That said, if I drop the OR block and only compare for the "Five", it still doesn't work.

    If I change the YourVariable from a string to a number and check if it equals 5, it does work. But I need to check a string, and I don't understand why checking for a string would break it if checking for a number works fine.

    I see — I don't think you can put OR blocks and Triggers in the same block, but I might be wrong.

    I've always separated them like this. This approach also stops the code from checking "YourVariable" every loop, which can slow things down, and just check whenever a Sprite object is created.

    But ROJOHound is right, it'd easier to see what your code looks like.

  • Is this what you're trying to do? Both of these work for me: