sweetdiss's Recent Forum Activity

  • Ah I just reread it... I’ll look into the “trigger once” thing! Thanks again

  • 'On collision' with spike is a trigger event and runs the function once. 'Is outside layout' runs every tick so repeats the function up to 60 times a second. You can fix it by adding trigger once condition to 'is outside layout'.

    Thank you! Is there a way to turn the “out side layout” check into a trigger event? Or another way to accomplish the same thing?

  • I have a PlayerDeath function that I call when my Player object hits a spike or falls off the screen (out of layer bounds).

    Inside the PlayerDeath function is a Wait command in order to display the Death animation, screen shake, and sound effect before restarting the layout.

    This works perfectly when hitting a spike.

    But when the player falls off-screen, the PlayerDeath function plays the sound effect repeatedly at the same time (so it sounds much louder). This behavior doesn't happen with the spike, even though the Spike collision and the falling off-screen both call the exact same PlayerDeath function. I'm not sure what the difference is and why the spike collision works perfectly but falling off the screen does not.

    I've included a picture of the PlayerDeath function (I'm very new so apologies if the code is amateur).

    The way I'm calling the function is either:

    Player -> Spike collision: Call PlayerDeath

    or

    Player -> Is outside layout: Call PlayerDeath

    Why does one work perfectly and the other causes the sound to mess up?

  • Hello again! I've got a platformer where the player stays fixed in the center of the screen (horizontally) but moves up and down. You move the player object through the level by panning (dragging) the level itself back and forth. This works great, but when the player comes to a wall, the wall just pushes the player back, sometimes even off-screen if you drag far enough.

    I fixed this by setting the player position to X = 240 (center of the screen) for every tick. Now the player stays fixed in the center like I want, while still moving up and down.

    But now the walls just move straight through the player even though they are both solid.

    What I'd like to happen is for the level to stop panning when you try to drag it through the player.

    Here is a visual of the level:

    (Ignore the swirl on the player, that's an effect for the end of the level)

    When I pan that wall to the left, into the player, the wall is supposed to STOP moving. The idea is to wait until the player goes up or down and THEN you pass the wall under/over the player to keep moving, but as I said this doesn't work. Now that the player is fixed horizontally the walls/player just pass right through each other.

  • Try this:

    .

    That worked perfectly! Thanks so much.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In my platformer, I have the player staying in the center of the viewport and you move the level around him/her, essentially making the character move to the end of the level by panning the level itself.

    My "level" is a bunch of platform sprites pinned to a large invisible object that you can drag back and forth.

    Since the camera/viewport is fixed on the player that never moves horizontally, the built-in parallax for backgrounds doesn't work (as the layout is not technically moving).

    I have a tiled background on another layer and I'd like to make it scroll along with the "level" object being dragged, but obviously at a slower rate to simulate the parallax effect.

    What might be the simplest way to accomplish this effect? (I'm still super new at this!)

    Thanks!

  • I think the easiest method is to add a giant invisible TiledBackground (or sprite) object with Drag&Drop behavior, and pin all platforms to that object.

    On start of layout -> Platform pin to Attacher (Not the other way around!)

    And don't use bar style or rope style for Pin.

    Thank you!

  • I'm extremely new to Construct 3 (and game development in particular) so this is probably super easy, but I'm stumped.

    I'm trying to create a little platformer where instead of moving the player character, you move the level itself (sort of like Landsliders on iOS).

    I have multiple platforms suspended in the air, and I'd like to "pan" the level but dragging the screen and having all the platforms pan back and forth together with the player staying in the center.

    Here's what I've tried:

    - Creating the 'level' as one single sprite that can be dragged horizontally. The problem with this is I can't figure out how to make multiple hitboxes/collision masks (whatever the proper term is?) for each platform inside the single 'level' sprite. I used the mask tool but I can only make one mask shape instead of one for each platform in the sprite.

    - Pinning. I created an "attacher" sprite that sits under all the separate platform sprites, and the attacher can be dragged horizontally. I attempted to Pin all the platforms to this attacher object so they would move with it, but I think I did it wrong because only the attacher moves. In the Event Sheet I used System > Pick All "PlatformSprite" > "AttacherSprite" > Pin Pin to "PlatformSprite" (bar style). I also tried it the other way around, with the second half being "PlatformSprite" > Pin Pin to "AttacherSprite" (bar style) but neither worked.

    Is there an easier or simpler way to accomplish this?

    Thank you!

sweetdiss's avatar

sweetdiss

Member since 8 Aug, 2020

None one is following sweetdiss yet!

Trophy Case

  • 4-Year Club
  • Email Verified

Progress

5/44
How to earn trophies