brushfe's Recent Forum Activity

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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!

  • If you haven't already, check out imagepoints in the manual. If you need to pin something, you might need to set the imagepoint higher on the enemy sprite, which you can do inside the animation editor.

  • Good to hear you've got it sorted! I think oosyrag is right about AdvancedRandom; it took me a while to get into it (the tutorials on this site are great), but it's amazing for generating interesting gameplay situations in an elegant way. Hopefully you can dive into it some time!

  • There are certainly more elegant ways to do this (mentioned by other users above), but this is one way to solve it. It introduces a new variable called "next position" for easier comparison.

  • 1.)So you mean to say it is my responsibility to figure out in advance that servers are gonna be down. Cool

    2.) Service is down for more than 48 hours. Read again. 48 hours

    3.) If they would had been working on the issue then they would had issued a message.

    It's not difficult: if you don't want to accept unexpected outages, your development workflow should use build services that are under your control. Or, if you use 3rd-party build services, you should expect that your workflow will be occasionally interrupted by unexpected outages and external dependencies. It's one or the other. More control and less convenience, or vice versa. If you choose convenience, but also expect things to go your way/move at your speed/etc., you're likely going to be as unhappy as you are now.

  • > chill they got the message it'S the weekend

    Completely rubbish

    Spending weekend doesn't mean that you have right to strip someone's weekend. I lost 2 days of productivity.

    Not sure there's any need to jump to conclusions here. For all you know, there could be people trying to solve this since Friday.

    We all signed up for a software service, and services go down. It's part of every software service. If that's not factored into your productivity, you should look at your workflow, rather than lash out at others for inconveniencing you.

  • Thanks for the replies!

    I should've added this is a new problem, starting with r270. It may be tied to the new effects editor; I'm still trying to understand where the problem is coming from.

    But I didn't know about the layer trick! I'll definitely try that out.

  • Has anyone experienced a drop in FPS using when using effects and Fullscreen Quality set to High?

    I've got a rather large project that uses multiple Replace Solid Colour effects on sprites and tilemaps. When I enable the effects, the fps drops from ~60 to ~30 when the Fullscreen Quality is set to High.

    When I switch to "Low" Fullscreen Quality, the FPS sticks to a steady 60+.

    I'm trying to find time to boil it down to a bug report, but if nobody else has had the problem, perhaps it's something on my end!

  • You do not have permission to view this post

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