oosyrag's Forum Posts

  • First step is to upload a capx example of what you have done. Videos are usually not as helpful. In your particular case, we can't even view the video because it is on facebook.

  • You seem to be operating under some mistaken assumptions regarding layouts and persistence.

    You cannot affect anything on a different layout than the one you are currently on with events, regardless if they share event sheets.

    The persist behavior doesn't have anything to do with memory, it just saves the state of that object for when you return to the layout.

    If a sprite is already loaded into memory in the current layout and is also present on the following layout, it will not get unloaded from memory between the layouts.

    So to do a proper loader layout, you simply load the sprites that you need in the following layout in the current layout. They can be invisible if you want. When you switch layouts, those objects will already be in memory.

  • Then your problem would be solved...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Recommend removing third party plugins from your project and re-uploading to get help.

  • C2 free version allows for 100 events. There is a looot you can do with 100 events if you're efficient about it. It was too lenient so they reduced it to 50.

    A well designed game will not use too many unique condition specific events - instead opting for flexible events that cover many situations by using expressions. If you take a look at the examples, most don't go above 20-30 events, and all the core game logic is pretty much there already.

  • It works fine exactly as shown. You probably have something else causing the problem.

    If you isolated the issue to post a .capx you could probably see that for yourself.

  • Oh right, I remember I was the one who mentioned the max speed thing haha. Here's how I would do it:

    + Player: On collision with Enemy

    -> Player: Set Platform vector X to -1000

    -> Player: Set Platform maximum speed to 1000

    -> Player: Start ignoring Platform user input

    + System: Player.?Platform.?MaxSpeed > 330

    -> Player: Set Platform maximum speed to max(?300?,?abs(?Player.?Platform.?VectorX)?)

    + System: Else

    + System: Trigger once

    -> Player: Stop ignoring Platform user input

  • Event 2 is a subevent of event 1. Therefore it runs only one time, on collision.

    You'll need another condition to determine when to start/stop running your lerp event.

    Honestly I would say lerp isn't the right method to use for this application, you should probably set platform behavior vector x.

  • lerp(player.x, player.x-200, 0.5) is the equivilant of moving the player left 100 pixels every time it is run.

    Since player.x gets updated every time it is moved, lerp isn't doing much here.

    Example if you have running every tick

    Frame 1. Player.x is 2000. lerp(player.x, player.x-200, 0.5) = lerp(2000, 1800, 0.5) = 1900

    Frame 2. Player.x is 1900. lerp(player.x, player.x-200, 0.5) = lerp(1900, 1700, 0.5) = 1800

    Frame 3. Player.x is 1800. lerp(player.x, player.x-200, 0.5) = lerp(1800, 1600, 0.5) = 1700

    and so on.

    If you want a gradual movement that slows down, use a fixed target (usually accomplished by setting the target position in a variable once). So set TargetPosition to player.x-200, one time. Following the previous example on frame 1, this would be 1800.

    Frame 1. Player.x is 2000. lerp(player.x, TargetPosition, 0.5) = lerp(2000, 1800, 0.5) = 1900

    Frame 2. Player.x is 1900. lerp(player.x, TargetPosition, 0.5) = lerp(1900, 1800, 0.5) = 1850

    Frame 3. Player.x is 1850. lerp(player.x, TargetPosition, 0.5) = lerp(1850, 1800, 0.5) = 1825

    and so on. You can see the amount the player moves each tick gets less and less, but it will never actually reach 1800.

    If your lerp event runs only once, it also doesn't serve much purpose in this case.

  • If you made an isolated example that showcases your problem that would be a good place to start.

  • That's why you're making a tutorial for it isn't it?

  • "Using the sine behavior to create nifty animations"

  • For advanced sorting of arrays (and shuffling), you generally want to use a second placeholder array. Push your values in the desired order to the second array, delete the index of the original values in the first array, and then optionally copy all the sorted values back to the original array.

  • Sorry it was actually "trigger once while true", not run once while true. You can find it in system conditions.