Nemlokt's Forum Posts

  • Thanks for the response. I did as you said and it does indeed work with another On start of layout event.

    Do you have any suggestions to how I can get around this when spawning a new red square, and using its 'On created' event instead of 'On start of layout'? Using another On created after it isn't working, and I don't know of another way to simulate the same solution.

    Edit: Scratch that, I had the wrong function being called. Having another On Created works as well. Thank you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry if this question is confusing, I'm very confused as well.

    Here's the capx, it's probably better at explaining itself than I will be:

    https://www.dropbox.com/s/6xjmj13x95048 ... .capx?dl=0

    At the start of the layout, I make a red square spawn a blue square, and have Red store Blue's UID, while Blue also store's Red's UID.

    I have two functions. They both do exactly the same thing: they accept the UID of a red square as Param(0) and pick the blue square it spawned. The only difference is in how they pick the blue square: either

    • by using Blue's Pick by UID action and using the value stored in Red, or
    • by using Pick By Compare and comparing Blue's stored Red UID value to Red's actual UID.

    The latter method doesn't work. But it only doesn't work if I do as I said above and have Red spawn Blue and store values at that point. If I actually just have Blue on the layout, don't spawn anything, and still have them store each other's values on Start of Layout, the latter method works perfectly fine. It also works if I call the latter function by clicking on Red.

    The only conceivable reason I can think of is that on the start of layout, the Pick By Compare function runs before Blue has a chance to store Red's UID, and thus when the function tries to Pick By Compare, Blue's stored value is still 0. Is this actually the case?

  • What I ended up doing is use the same idea in the tutorial along with Spriter (the free version) to create a 101 frame animation, with its speed set to 0.

    Frame 0 is the radial when it's empty, and frame 100 is the radial when it's full. Thus, I can just take the percentage of whatever I'm keeping track of and every tick set the frame of the radial animation to that percentage. So 50% would be frame 50, 75 percent would be frame 75, etc.

  • Oh well. I was hoping there'd be a way to set it up without just having another entire block of actions.

    Thanks anyways.

  • Basically I want to test something along the lines of

    'If Cond1 AND Cond2 are both true, OR if Cond3 by itself is true, do something.'

    Or in other words, '(true && true) || true'

    As far as I can tell, I'm only able to turn an entire block into a bunch of single OR conditions.

  • I wanted to make a radial life bar and found the tutorial that shows you how to make one using 4 half-circle sprites.

    Performance-wise, would it be more trouble for Construct 2 to render 1 sprite with 24 frames, or 4 sprites with just 1 frame each?

    The tutorial I'm talking about: https://www.scirra.com/tutorials/1377/h ... onstruct-2

  • Bump. No one has encountered the same problem?

  • You know how every time we remove a behavior we get a prompt telling us that any events referencing it will be removed? Is it possible for that prompt to also show us how many events will be removed if we go forward with it?

    Whenever I remove a behavior, I'm assuming that all of its related events have been replaced or just plain cut out of the event sheets. I find it terrifying that I may have missed something important, and an event still referencing the behavior hasn't been properly replaced. Anyone else?

  • Problem Description

    Touch 1 doesn't update position if Touch 0 hasn't moved.

    Happens on Firefox for Android and the default Android browser, but not on Chrome for Android.

    Edit: After testing some more, it seems Touch 0 also doesn't update its position until it's moved a certain amount after the initial touch. Actually, I guess that's the real problem.

    Still only affects Firefox on Android and Android's default browser. Also tested this particular behavior on Firefox, IE, Chrome, and Chrome for Android.

    Attach a Capx

    dl.dropboxusercontent.com/u/102867918/Multi-Touch%20Dragging%20Issue.capx

    Description of Capx

    Keeps track of up to one Touch on each half of the screen (maximum 2), and positions a marker for each. Ideally, you should be able to drag on both sides of the screen at the same time, independent of one another.

    Steps to Reproduce Bug

    • Step 1 - Touch once on either half of the screen but don't move it from that position.
    • Step 2 - Touch once on the other half of the screen and attempt to drag around.
    • Step 3 - Notice how the second marker isn't updating its position and pull your hair out.

    Observed Result

    The second marker simply stays at the position it was first created at.

    Expected Result

    Second marker should be updating its position to wherever Touch 1 (the second touch) is.

    Affected Browsers

    • Chrome for Android: NO
    • FireFox for Android: YES
    • Internet Explorer: Is there a version for Android?
    • Default internet browser on Android: YES

    Operating System and Service Pack

    Android 4.4.2

    Construct 2 Version ID

    221

  • Problem Description

    Touch 1 doesn't update position if Touch 0 hasn't moved

    Attach a Capx

    dl.dropboxusercontent.com/u/102867918/Multi-Touch%20Dragging%20Issue.capx

    Description of Capx

    Keeps track of up to one Touch on each half of the screen (maximum 2), and positions a marker for each. Ideally, you should be able to drag on both sides of the screen at the same time, independent of one another.

    Steps to Reproduce Bug

    • Step 1 - Touch once on either half of the screen but don't move it from that position.
    • Step 2 - Touch once on the other half of the screen and attempt to drag around.
    • Step 3 - Notice how the second marker isn't updating its position and pull your hair out.

    Observed Result

    The second marker simply stays at the position it was first created at.

    Expected Result

    Second marker should be updating its position to wherever Touch 1 (the second touch) is.

    Affected Browsers

    • Chrome for Android: NO
    • FireFox for Android: YES
    • Internet Explorer: Is there a version for Android?
    • Default internet browser on Android: YES

    Operating System and Service Pack

    Android 4.4.2

    Construct 2 Version ID

    204.2

  • In my tests with the pathfinding in a simple test with rotation enabled, the calculation seems very fast.

    However, with the rotation turned off, the time you spend to rotate the sprite, it still used but not rotate the sprite. So it gives the feeling that the calculation is slower.

    It has been over 2 years since this has been posted, but I absolutely still needed to register just to thank you for posting this.

    THANK YOU!