Fib's Forum Posts

  • I don't think you can with the pin behavior since it stops all other movement from happening. If you remove pin then you could just add an image point to your invisible wall, then every tick set the platform x and y to the image point. Then sin behavior *should* work relative to that position.

  • It's a math problem mostly and there's lots of ways to do it depending upon the type of motion you want. But the simplest way I would go about it is to do it is with percentages and linear motion. Here's an example.

    First you need a number that goes up when your speed is down, and down when your speed is up. I chose to express the speed as a percentage, then take the inverse of it. So when current_speed goes up, the output of the equation goes down.

    Inverse percentage of speed = 1 - (current_speed / overall_max_speed)

    Then I decided to incorporate a min and max zoom level so you have a definable range. So first I multiplied the inverse percent of speed to scale the max zoom level.

    Scaled max zoom = max_zoom * (1 - (current_speed / overall_max_speed))

    Then I just add the min zoom to the whole thing to ensure we don't ever get zero, and also so we can control the lowest zoom level. So here's the entire equation.

    Set Layout Scale = min_zoom + (max_zoom * (1 - (current_speed / overall_max_speed)))

    The zoom range is between min_zoom and (max_zoom + min_zoom).

    I hope that helps!

  • How will you be using it? Is it for a racing game? Should the zoom work more slowly as the speed increases? Or zoom faster as the speed increases?

  • is that a timeline animation?

  • Thank you skymen! I may be able to test it out as I have a C3 game on steam. We'll see if I can get it up and running.

  • Most of the time it just means "extended" or "extra". It does the same thing as an existing function but does it differently, or adds something extra. I think it originates from the days in programming before function overloading was a feature in programming languages.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok good to know. I kind of feel like the manual should state that for extra clarity.

  • EDIT: If anyone needs this to be ported to C3, also do tag me, or I'll just eventually port it one day when I have some time.

    skymen Yes please, port it to C3 :) That would make my life much easier! I would super appreciate it.

  • Hello construct community,

    I'm noticing that when I call a built-in function after a condition (the condition picks 1 out of many instances), the actions inside the function apply to all instances rather than the one that was picked from the parent condition (the parent condition is outside the function).

    Are picked instances suppose to be reset after entering a function? Or is that a bug?

  • It's not totally clear what you mean. Do you mean storing the pixel data of a Sprite in a construct array at runtime?

    If not you may need to show an example.

  • There's lots of ways to do that. My preferred way would be a timeline since I think it's the most flexible. Animate the rotation back and forth using like 2 keyframes. Then on collision play the timeline. I think you can even set it to loop. If the wheel has different speeds, you could adjust the playback speed of the timeline to match the speed of the wheel.

  • With those 2 conditions, both objects will get picked. To tell them a part I would save the UID of the object you're dragging to a global variable. Then when you drop and test for overlapping, pick the UID that is NOT equal to to the one you dropped, then save the UID of that other object. Now you have both UIDs of the dropped object and the overlapping object. If you have that then swapping their variables should be easy.

    I hope that makes sense.

    That would only work with 2 objects though. If 3 or more objects are overlapping then you would need further conditions...

  • Yes you can. It's a relatively new feature. In the "Move To" behavior, there's a "Move along timeline" action. You just create a bezier path within a timeline first. Be sure to read the manual on how both "Move To" and "Timelines" work first to make it easier on you.

  • Are you using the "Play" action or "Play (by name)" action?

    If you're using "Play (by name)" then you could just change the name of the the new sound (in the project folder) to whatever name you're currently using in events.

    If you're using "Play", then I believe you are out of luck. You'll have to change each one individually. If that's the case you can at least use the Find function (ctrl + f) to get a big list of them and then double click on each of them in the Find Results window to jump to it.

  • I have a hunch "Trigger Once" is the problem. From my experience "Trigger Once" doesn't work very well when there's multiple instances. Try to figure out a way to solve the problem without it.

    You can start here:

    Then:

    So on and so forth until all the "Trigger Once" conditions are gone.