brushfe's Recent Forum Activity

  • Same here!

    It started after a crash opening a Local Project Folder, when I got this crash message:

    Error report information

    Type: unhandled rejection

    Reason: Error: missing placeholder '{0}' in string substitution Error: missing placeholder '{0}' in string substitution at Function.ip.fTa (https://editor.construct.net/r278/main.js:1008:245) at q8b (https://editor.construct.net/r278/main.js:1027:477) at Function.f.q0 (https://editor.construct.net/r278/main.js:200:274) at window.aic.Idb (https://editor.construct.net/r278/components/misc/startPage2/startPage2.js:9:342) at xib (https://editor.construct.net/r278/components/misc/startPage2/startPage2.js:4:177)

    Stack: Error: missing placeholder '{0}' in string substitution at Function.ip.fTa (https://editor.construct.net/r278/main.js:1008:245) at q8b (https://editor.construct.net/r278/main.js:1027:477) at Function.f.q0 (https://editor.construct.net/r278/main.js:200:274) at window.aic.Idb (https://editor.construct.net/r278/components/misc/startPage2/startPage2.js:9:342) at xib (https://editor.construct.net/r278/components/misc/startPage2/startPage2.js:4:177)

    Construct 3 version: r278

    URL: editor.construct.net/r278

    Date: Tue Jan 11 2022 11:55:55 GMT-0500 (Eastern Standard Time)

    Uptime: 13.3 s

    Platform information

    Browser: Chrome

    Browser version: 97.0.4692.71

    Browser engine: Chromium

    Context: browser

    Operating system: Mac OS X

    Operating system version: 10.15_7

    Device type: desktop

    Device pixel ratio: 1

    Logical CPU cores: 8

    Approx. device memory: 8 GB

    User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36

    C3 release: r278 (beta)

    Language setting: en-US

    WebGL information

    Version string: WebGL 2.0 (OpenGL ES 3.0 Chromium)

    Numeric version: 2

    Supports NPOT textures: yes

    Supports GPU profiling: yes

    Supports highp precision: yes

    Vendor: Intel Inc.

    Renderer: Intel(R) Iris(TM) Plus Graphics OpenGL Engine

    Major performance caveat: no

    Maximum texture size: 16384

    Point size range: 1 to 255.875

    Extensions: EXT_color_buffer_float, EXT_disjoint_timer_query_webgl2, EXT_float_blend, EXT_texture_compression_rgtc, EXT_texture_filter_anisotropic, EXT_texture_norm16, OES_texture_float_linear, WEBGL_compressed_texture_s3tc, WEBGL_compressed_texture_s3tc_srgb, WEBGL_debug_renderer_info, WEBGL_debug_shaders, WEBGL_lose_context, WEBGL_multi_draw

  • That did it! So simple, gah! Thank you very much!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Happy new year!

    I'm trying to create movement for a game with a perspective similar to a beat-em-up. Whether I use 8-direction or Custom Movement, there's a serious judder when the object moves diagonally.

    If anyone has any clues on how to smooth out the movement, I'd really appreciate it!

    The movement code is here, if it's helpful:

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

  • It looks fantastic! Great work and thanks for sharing it!

  • Hello! I feel like there was a plan to review the suggestions page every six months or so, to try and make the platform more applicable - is that still the case?

    (There are a lot of great ideas on there and I'd love to see how this new approach to user input works out.)

    Regardless - happy holidays to everyone! It's been an amazing year for construct, so a huge thank you to the Scirra team. And to all those who've been helping each other out with their projects!

  • You could also try giving each powrplant a boolean called IsActive. It starts false, but when the plant gets activated by three workers, you set it to true.

    Then, whenever you run a check to see if a powerplant should get activated, also check if IsActive is false. So you'll only ever activate plants that have false booleans.

  • I don't know if this solves your problem, but it looks like both those blocks of code are running on each mouse click.

    The first block (if WorkersAssigned ≥1) sets Minerals.WorkerAssigned to 0. Then the next block checks if Minerals.WorkerAssigned is ≥0, which it was just set to, so it runs as well.

    If that's causing you problems, you could try putting an else statement in that second condition, so it reads "else if WorkersAssigned ≥0". That way the mouse click only checks for ≥1 or ≥0.

    You might also need to pick a specific Minerals object. Right now, your actions are picking a random member of the Minerals family, which could also cause trouble (unless you only have on Minerals object).

    Hope something in there is helpful!

  • That code looks like it's going to restart the animation every tick -- so it's essentially stuck playing the first frame of the animation over and over again.

    You might try removing the condition

    • Every tick

    and replacing it with an inverted animation check

    • X is playing animation "Walking"

    which you can do by creating an "is animation playing" condition, right-clicking on it, and selecting "invert".

    In short, this new code would only play the animation if it wasn't already playing.

  • Right, that makes good sense. And certainly minimizes the amount of if/else comparisons. Thanks very much!

  • Sorry, what I'm asking is how people deal with calling functions with boolean parameters when the boolean value isn't known.

    Ideally boolean parameters wouldn't be a tick-box, but a value field, like string and number parameters are. That way you could use a variable value at runtime. Instead it's hard coded by the programmer.

    E.g. Say function PrepareMeal has three booleans: eatsMeat, eatsVeg, eatsFish. And say the customer object has the same three boolean variables, but each customer has a different combination of true/false. You'd ideally pass through the customer objects' boolean values into a single function call, like "PrepareMeal(cust.eatsMeat,cust.eatsVeg,cust.eatsFish)", but functions don't accept variables for booleans.

    So it seems like you either have two options:

    1. Use a bunch of if/else statements calling the function with different combinations of booleans.

    2. Use a Number parameter instead of a boolean, which can accept a variable.

    Option 2 seems best, it just felt weird to not use boolean parameters for boolean variables.

    So I thought I'd ask if there was a better approach to this before converting all these if/else groups to functions using numbers instead.

  • What's the best way to set a boolean in a Function call based on a variable value?

    I can only see the "tick box" in the Function call dialog, which is only set by the programmer.

    My current solution is a pair of if/else statements for each boolean:

    • If sprite.boolean, call Function with the boolean tick-box ticked.
    • Else call Function with the boolean tick-box unticked.

    Now I'm thinking all the Booleans parameters should just be Numbers-but doesn't that defeat the purpose of having Boolean parameters at all?

  • I've only played the first few levels, but this is really impressive! Especially for 50 events. I'll see how far I can get on my poor trackpad...keep up the great work!

brushfe's avatar

brushfe

Member since 21 Jul, 2013

Twitter
brushfe has 2 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • RTFM Read the fabulous manual
  • x10
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x3
    Lightning Draw First person to up-vote a new Construct 3 release
  • x3
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

21/44
How to earn trophies