LukeWolf's Forum Posts

  • My avatar is obviously not 128x128, but I had to make it that size with the rest as white space and I cannot upload a transparent avatar at all, also seems a bit crazy to have to make your avatar square. Will these rules become more flexible?

  • There does not appear to be a setting to get an email notification when someone responds to your thread. Sure you can follow it, but you won't get email notifications anymore? What happened to that?

  • Hey Dop,

    I could not embed the screenshot of my code on the forum for some reason, you'll have to go to the link. It must have something to do with the major forum upgrade because I initially could not do a lot of things that I wanted to show you and I only just got my avatar back. What a mess. Sorry if my initial request was confusing in any way. I could not edit it after I posted it.

    My understanding of families here are that if you add an object to a family and you add instance variables for that family, then those objects in that family will be impacted by those instance variables that the family has.

    In this case, I set an instance variable to the family, and like the screenshot showed you, it should be toggling all objects in that family to visible or not visible.

    This is fine initially but later on when helper sprites are created (for example, I wanted to toggle the visibility of my pathfinding_destintion_helper sprite for each of my people), but people are spawned later rather than at the start of the layout, and if I have the toggle off some people spawn with it's visibility off and some people spawn with it on. This seems to occur mainly if a person is created in the middle of toggling it so some sprites in the family have their visibility on when the boolean is off, and I can't seem to match the sprite's visibility with the family's visibility later for some reason. I just don't understand what I am doing wrong here.

    If I use a global variable, that means I have to toggle the visibility specific for each sprite instead, and I know I can do that, I just thought it would be easier to do this with families since later on, I will likely add other objects for debugging and my outlook of this would be a simply matter of just adding the object to the family so I don't have to go adding it to the code.

  • Hello,

    I'm trying to add a debug system to my game.

    To make this easier, I have a family for Helper Sprites

    I create a toggle for the T key. When the T key is pressed, it will toggle the visibility of the sprite.

    However, some sprites are not going to exist when the game starts so when the game creates them later, they will not always sync with the properties of the family, so if the family is suppose to be invisible, some sprites will not go invisible.

    The helper sprite's properties are initially set to invisible.

    Here's a screenshot of the code:

    https://i.imgur.com/muqMAaz.png

    I don't understand what I'm doing wrong here.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When you use the pathfinding behaviour clear obstacles action followed by regenerate pathfinding map around object, does it clear obstacles for every single instance or only the instances that are picked by the conditions?

  • Ashley will look into these bugs, it's just that him and his team are mainly focusing on Construct 3 beta at the moment, so expect a delay. Plus, there is a bug with collisions that he is trying to work on as well. There is a blog on that issue on the website, so we just have to be patient. In the mean time, you can either just type out the entire expression or rename your objects to remove the underscore _ in them, because not having an underscore seems to be the best workaround at the moment until this is fixed. I love using the underscores in names and whatever, so I'll continue putting up with this until it's fixed.

    Good work discovering that it's not just variables, though!

  • I reported something very similar to this here:

    Except in this case, you discovered that it does not seem to be impacted by just variables, it's any object, expression or variable being picked up by C2 after the _. You have objects starting with S_ so if you go to search anything after S without putting an _ in, it will just disappear.

    I suspected that this bug to have a more broad impact.

  • Problem Description

    Underscores stop C2 from guessing expressions after the underscore or if you make a spelling mistake with the variable's name after the . character (until you backspace passed the . and then it will start guessing again

    You will not need to run the layout to see this bug.

    Attach a Capx

    https://www.dropbox.com/s/rureks7adycnc0d/Underscores%20stop%20C2%20from%20guessing%20expression%20after%20the%20underscore%20or%20spelling%20mistake.capx?dl=0

    Description of Capx

    Demonstrates that C2 will stop guessing your expressions under two circumstances.

    Steps to Reproduce Bug

    • Step 1) Create an instance variable for a sprite object and (boolean or value) and call it "b_example"
    • Step 2) Create a variable called "Blah" (You can name this whatever you want, just make sure the first letter starts with the characters 'B' or 'b'
    • Step 3) Go to the event sheet.
    • Step 4) Select the sprite object to add an action.
    • Step 5) Select an action that allows you to enter an expression. For example: "Set Value"
    • Step 6) Type out your expression but make sure you are typing out the "Blah" expression. For example: "Self.Blah" You will notice that after you type the 'B' or 'b' Character, it will stop guessing what you are trying to enter and the expression results disappear.
    • Step 7) Change the name of b_example to bexample, then start this test from Step 3. When you get to Step 6, you will notice that construct will not stop guessing your expression and will continue to keep it up until you decide to select something or finish that part of the expression after the . character.
    • Step 8) Providing there are no underscores in any variables, type your expression after . with a spelling mistake and even though you backspace to fix spelling mistake, C2 will not guess your expression until after you delete and replace the . (the full stop/period character)

    Observed Result

    C2 stops guessing your expression to select from the expressions list under where you are typing.

    Expected Result

    C2 keeps results there until you have finished typing all characters of your expression (or selected from the expressions list)

    C2 returns expressions list when your expression no longer has any spelling mistakes after the . character without having to replace it.

    Affected Browsers

    • Chrome: N/A
    • FireFox: N/A
    • Internet Explorer: N/A

    Operating System and Service Pack

    Microsoft Windows 10 Pro v10.0.17134 Build 17134

    Construct 2 Version ID

    Beta release r257.3

  • dop2000 I have made those changes as well as put timers for every cooldown variable system I had, it was a bit of a learning curve but things are working very nicely, now. Thanks for your help!

    Edit: Thanks for your help, AGAIN!

  • dop2000 This is now working very well. I just want to make sure that I have done what you have suggested correctly, in terms of performance. There is just one thing I had to change, though, and you will see it just after the timer is triggered for the building, because "For Each" was working but the person was not constructing buildings in the order they were placed (something I forgot to tell you earlier, but don't worry I worked it out!) What was happening was; because each building had an individual timer that was running at independent times to each other (caused by the player not being able to place all blueprints down at once), a building with a higher Build_ID would get attention first if it's timer triggered first, and the person would just get assigned to the later blueprint instead, so pick all blueprints placed seems to fix that.

    Anyway, please have a look now, I hope I have done this adequately:

  • Hey! I just want to thank you guys for responding despite the forum's current condition, which is very frustrating at the moment.

    Even though I have posted something here, I have been hard at work trying to get this right. This is now working but with terrible side-effects. Event 76 is this currently:

    dop2000 I much appreciate your detailed response and suggestions. I wasn't able to simplify things due to the mess I got myself into. I actually like your idea, however, there is one thing I am not sure about; In my game, my player will be able to place multiple blueprints regardless of people availability/resources. What if all my people are building and there is no one free? How is it possible to have a trigger event in those circumstances if I'm not constantly checking conditions every tick?

  • Extremely slow. It's lagging that much for some people that they have ended up multiple posting. It's also impossible to see anyone's forum profile at the moment; I just get a time out error page with a whole stack of error coding:

    Server Error in '/' Application.

    Source Code:

    "An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below..."

  • Hey guys,

    I'm in a bit of a mess with my project.

    In my game, people can construct buildings. However, I can get one person to construct a building, that's fine. But if I have more than one person that can build something, everyone rushes to build it which is not suppose to happen. I simply cannot get it to happen properly. I basically want the closest available person to be picked for the job.

    What happens:

    Buildings:

    For every building placed by the player, the game assigns that building with a unique Build_ID value from the Build_ID global variable which incrementally increased when a building blueprint is placed but before it gets assigned to the building. In this state, the building initially has Builder_On_The_Way set to false and Construction_Progress set to 0. Then the building waits for a person to come and construct it.

    Person:

    People (Person) sprites by default have their status set to 0 so they will just "wander around". The game currently sets the position of the Pathfinding_Destination_Helper sprite to a random co-ordinate on the layout (I use the helper sprite so I can get a visual of where they are going). Their status is set to 0, and by default when set to 0, their BuilderAvailable boolean is also set to false. Under these conditions, a person is available to be assigned a building to construct if they are the closest person to it.

    I believe the problem lies here somewhere, but I can't make sense of it.

    So you understand the statuses:

    Assigning builders:

    Please help, I'm going mad!

  • Hey dop2000

    Thanks again for your feedback and suggestions. Sorry I took so long getting back to you, here. To my dread, I had a number of boring real life things to deal with, as you do.

    I took up your recommendation about the progress variable which will change for each building depending on the stage it is up to. I think based on this, it should become very easy to create more buildings simply by checking the "Currently_Building" variable on the construction site:

    I hope this is good now.

  • Hey dop2000

    This seems to work all right, but I just wanted to share my C2 code to see if I've done it properly: