Monketo's Recent Forum Activity

  • Problem Description

    I have a loop that calls a function when certain criteria are met. In my game, once a screw is "unscrewed" a function is called. However, for some reason the function isn't being executed the first time it's called in the loop.

    Attach a Capx

    https://drive.google.com/open?id=0B2mi7Z0OwMDqWjEwMlhkLURBRmc

    Description of Capx

    This is a big project. The issue occurs in the function "addItemToInventory" (look at group "funclib"). The first time the function "checkFasteners" is called inside this function, it does not execute. I tested this by setting up a test var in the function and at the point the function is called. The test var near the call to the function changes, but the test var within the function "checkFasteners" does not until the function has already been called once inside the funtion "addItemToInventory".

    Steps to Reproduce Bug

    • Step 1: Walk up to the door control (WASD) and press "R".
    • Step 2: Click on the screw driver and unscrew each of the screws in the face plate by clicking and holding the tip of the screw driver to the screw.
    • Step 3: The var "test" changes when you remove a screw and which calls the "checkFasteners" function and test2 changes when that function is actually executed. You'll see that test2 only increments after the second screw (and all subsequent screws) are removed.

    Observed Result

    The function is not executed the first time it's called.

    Expected Result

    The function "checkFasteners" should execute each time it's called.

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet Explorer: NA

    Operating System and Service Pack

    Win 7, SP1

    Construct 2 Version ID

    239 64-bit

  • Could someone who's been working with this plugin tell me if it's possible to create random ships, like the ones shown here (http://www.pentadact.com/2014-07-19-improving-heat-signatures-randomly-generated-ships-inside-and-out/ )?

    Thanks!

  • Thanks, both of you!

    I really thought the solution to this wasn't going to be more complicated, so this is a great outcome. And thanks ErekT for the detailed explanation of what's happening.

  • Hey everyone, I'm looking for some advice on removing jitter from my camera.

    I'm using this tutorial https://www.scirra.com/tutorials/626/making-a-smooth-following-camera?page=2 to try and create a smooth camera effect. Which is using a scroll-to behavior with the lerp function.

    However, as you can see in the gif, everything seems to be jittering quite a bit.

    This happens in both Firefox and Chrome browsers.

    Thanks in advance for any advice.

  • Pining the object to the player worked!

    But, now I'll need to set multiple image points on the player for different text alignments (and I'll also need to adjust the text for when the sprite is flipped so it doesn't appear outside the bubble. That's two image points for each dialog alignment!), so unfortunately it's a little more work than I would like. I still don't fully understand why pining it to the speech bubble caused the lag and I have to think that's a bug. But maybe something is just going over my head?

    As you can see in my GIF, I'm still working on getting the text position to be right all the time, but it no longer jitters.

  • I quickly tried setting the UI layer parallax to 0,0 which worked like a charm. Thanks!

    I've not tried using the pin behavior on the Sprite Font, but it sounds promising. Thanks blekdar and

  • Thanks blekdar, I'll give both of those a try!

  • I tried searching for this but couldn't find anything in the forums about it. Thanks in advance for any help!

    I'm having a problem where my text dialog and UI shakes when my hero is moving.

    I'm setting the position of the speech bubble and the position of the next in the same event and doing it every tick. My text is a Sprite Font object and I'm setting it's position to an image point on the speech bubble, which is being set to an image point on the player sprite.

    You can't see my UI in the GIF, but it's simply anchored to the top right using the behavior, and it shakes as well when the camera moves.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I know this is a fairly old thread. I have a question for JohnnySix:

    What if I wanted to rotate the square path? How would I apply the rotation of the path to the formula you're using to move along each edge?

  • Ah that's cool. The MoveTo basically makes an object move to a specific point. It was the only way I could the object to change nodes once it reach a specific X,Y coord.

  • I'm not sure I follow. Take a look at my link again, and click on the black circle to make the object rotating fly into the square. Once it hits the square the square will start to rotate (and the object changes into a square as well).

  • Hi everyone,

    I'm having trouble remembering the formula to adjust the position of an object based on the rotation of another.

    My current method is this; I have nodes set around the square itself to identify the 4 points I want to object to move to. I'm moving the object using the MoveTo plugin. Once the object reaches a node it's destination is set to the next node. This works well except for when the square rotates. The movement isn't smooth as it's simply following a straight-line path to the next node and not adjusting for the square's rotation.

    The problem is I can't think of the formula I need to use to adjust the object's position based on the rotation of the square. Any help?

    Here's the example (You'll need to click the black circle as the object in reference rotates around it. Once it hits the square you'll see what I mean):

    https://dl.dropboxusercontent.com/u/47512624/games/Public/Love%20Triangle/Love%20Triangle%20-%20Proto/index.html

    Thanks!

Monketo's avatar

Monketo

Member since 19 Oct, 2011

None one is following Monketo yet!

Connect with Monketo

Trophy Case

  • 13-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies