InDWrekt's Recent Forum Activity

  • You don't actually need that image to solve the problem. All you need is to know the distance the pixel is from the center of the image. Here is a simple project built off the Noise Textures built in example:

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

    Notice the event the sets the pixel:

    -> System: Set NoiseValue to (AdvancedRandom.Classic2d(XIndex, YIndex)

    - (distance(XIndex, YIndex, LayoutWidth ÷ 2, LayoutHeight ÷ 2) ÷ 400))

    × 100

    I am subtracting the distance from the center:

    distance(XIndex, YIndex, LayoutWidth ÷ 2, LayoutHeight ÷ 2

    divided by 400 which is the max distance of an edge to the center in this example:

    (distance(XIndex, YIndex, LayoutWidth ÷ 2, LayoutHeight ÷ 2) ÷ 400))

    It's super simple but kind of math heavy. Hopefully it helps though. Good luck with your project.

  • What you are looking for is, a state machine. Basically, a state machine is a series of code (actions and events) that contain and update a state variable with certain actions that can only be triggered if you are in a specific state. I built an example of a boss type fight using a state machine for a previous forum question that could help you out.

    drive.google.com/file/d/1t3nFqiq7syZXKRWGSOE-VrwVknfgDbeV/view

    Notice how each action checks the state value of the boss. Also remember, a state in a state machine must have an entrance case (an event that occurs in a different state that sets, or enters the new state) and an exit case (this is an event that is an entrance case to another state). Notice in the example how ever single state has at least one action that sets the state to a different state. These are the entrance and exit cases.

  • Just a little information about a loop that may help explain why this is not the correct way to do what you want:

    Loops in construct are intended to complete in a single tick. Introducing a delay the way you are trying would completely pause your game until the delay is over because no other processes could complete. Instead, a delay in a loop will just delay between actions that happen within each iteration of the loop.

    What you need to do is, record which position of the array you are on when you hit the delay and, exit the loop. Then, after the delay time is complete, start the loop again at the index you recorded. This is called an iterator.

  • Physics objects are only affected by other physics objects. Your player is not a physics object so it can't affect the block. If all you need to do is, push the block off the edge, there is an easier way to handle it. Take a look at this:

    youtube.com/watch

  • It's a simple fix. Your land tiles just need to have the physics behavior with the immovable property checked.

  • C3 has a built in example project called Invert Gravity Platformer. It shows how to swap gravity like in the video.

  • On display, pass the value into the int function. An int cannot have decimals but doesn't round.

  • Not sure what you find confusing about the drift recover. I'll try to make it more clear. The drift recover value is how quickly the direction the car is moving "catches up" to the angle the car is facing. What this means is, when the car is driving straight and turns to the right, it rotates its angle more quickly than the move direction changes. The default value for steer speed or the speed the car angle changes is, 225 degrees per second. The default drift recovery is 185 degrees per second. So, the default car object drifts and it takes almost a forth of a second for the car movement to match the angle of the car. To give the car a more noticable drift, you just need to set the drift recover value lower. A lower value makes the move dirction "catch up" slower so the drift lasts longer.

    Try this, create a brand new car object with all the default values. Then, change the drift recover value to 50 and test it out by driving in a circle. You should see a rather drastic drift.

  • I built this example for a different forum question but it makes use of the caontainer as lionz said. Take a look.

    drive.google.com/file/d/1vObtjdJppTivblySf-rn0Vx4bUH2fYTn/view

  • In the animation editor, click this icon:

  • On jump, check the direction and set it as a variable. Disable the players controls. Then, given the direction variable say: while not on the ground, simulate control left/right. When they land, re-enable player controls.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Getting a day night cycle that looks impressive can take a ton of work. However, to get one that is passable and doesn't take too much effort in Construct, you can use the built in sprite color property. Take a look at this example I built for you. It just uses the day image you posted.

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

InDWrekt's avatar

InDWrekt

Member since 19 Sep, 2011

Twitter
InDWrekt has 7 followers

Trophy Case

  • 14-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

19/44
How to earn trophies