calminthenight's Forum Posts

  • almostdarkslide

    Another way you could achieve this, provided the actual layout of your level isn't changing is to just switch animation frames or tile-map tiles. So your pristine world sprites are all in animation frame 0, and your destroyed world sprites are in animation frame 1. You could then dress up the transition in any way that you wanted, if you even wanted to.

  • I've done a quick example using individual sprites. There are plenty of ways you could do this though, including using the new hierarchy tools.

    In the example you click on the goombas to destroy them, this could be substituted with whatever method of removing them from the game you choose.

    1drv.ms/u/s!AkmrWgxeuxlKhIcMiraEjTB8iJqfNg

  • The camera position is based off where the mouse is on the screen, you can see by moving your mouse outside of the window then returning it at a different corner, the camera will move to that position.

    There are many ways you could do this but i have replicated the behaviour using lerp to lerp the X and Y positions of the object that the camera is scrolling to, to the positions of the mouse in relation to the centrepoint but divided by 10 to limit the camera's movement.

    Let me know if you have any questions :)

    Demo here: 1drv.ms/u/s!AkmrWgxeuxlKhIcLU9fa3WTI5aMhMw

  • Just change the 3rd number in your deceleration lerp to a lower number, but make sure you use a "dt" calculation rather than a fixed number to keep it frame-rate independent.

    So instead of lerp(X,Y,1) use lerp(X,Y,dt) or lerp(X,Y,dt*2) or dt/2 or 3 etc.

  • You can use the regex expression and do a comparison. I haven't done it personally, but there a few forum threads about the same thing you're asking.

    construct.net/en/make-games/manuals/construct-3/system-reference/system-expressions

    look up the regex expressions

  • to add timers like this to things i usually use a variable and then have an event that sets to variable to the time you want and an event that continuously removes time from that variable.

    for example: You make an instance variable on you player called "boosting"

    then for example

    When shift key pressed - set "boosting" to 0.5 (this gives you the amount of time you are after)

    then you link the action you are seeking to that variable being greater than 0. e.g.

    If player.boosting > 0 - set max speed to 100(or whatever u want)

    Inside this event you have a sub event that handles the countdown of the variable

    so sub event: -- every 0.1sec subtract 0.1 from player.boosting

    then finally you have an event that resets the action to normal when the counter has run down

    If player.boosting =<0 - set max speed to 50(or standard speed)

    Here is an example that i did for someone else of the same technique, that means that for 5 seconds after a player has overlapped the blood pool, they will produce bloody footsteps while moving. Same method.

    1drv.ms/u/s!AkmrWgxeuxlKhIcKKuFgyNMlgcROYw

  • The only way is to use "set playback rate" which will effect the time and pitch of a sound. Alternatively if you are looking for variations on say a laser sound, use multiple sound files and pick one each time the sound is required

  • EDIT: just realised already suggested this

    Looks like a bug to me. Have you tried doing it without using the sine behaviour? You could just lerp the Y position of the platform and achieve the same result. Then you could see if the problem persists.

    I'd use:

    If platform.Y is at lowerlevel.Y

    --Set Y lerp(lower.y,higher.y,dt*whatever)

    If platform.Y is at higherlevel.Y

    --Set Y lerp(higher.y,lower.y,dt*whatever)

    If this works correctly with the jump through behaviour you won't need to use your workaround.

  • Good to hear you got it. To do that you would use an instance variable on the player object. Say we call it "bloodied".

    Use the trigger: if player is overlapping blood pool - Set "bloodied" to 5

    then

    if player variable "bloodied" > 0 - then every 0.1 seconds subtract 0.1 from "bloodied"

    - sub event: If player is not overlapping blood pool - Spawn footprints

    1drv.ms/u/s!AkmrWgxeuxlKhIcKKuFgyNMlgcROYw

    :)

  • Here's a quick demo for what you are after. Depending on your game requirements you could do this without even using the turret behaviour.

    1drv.ms/u/s!AkmrWgxeuxlKhIcJVtfuJl2jKboqLw

  • I'm not sure if this is exactly what you're after but see my comment in this thread: construct.net/en/forum/construct-3/how-do-i-8/sort-layer-ordering-top-down-155027

  • Here's a demo showing the bounceback by 1 tile behaviour using a tilemap and tilemap movement.

    1drv.ms/u/s!AkmrWgxeuxlKhIcIQ2VduKbcv9VPaQ

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not sure what you mean by JSON for each, but if you are using a for each loop for any object then you will know the final number of the loop by using object.count-1. So to find the loop end you would check for if loopindex = object.count-1

    the -1 is because the count is zero based

    demo: 1drv.ms/u/s!AkmrWgxeuxlKhIcH_LLBEngDR_dcGw

  • To post your project file: Save your C3 project to a cloud service, or to your pc and then upload it to a cloud service. Then share that file (disable editing so the original won't get overwritten) and copy the link that is created. In your forum comment you can just paste the link in the text field. Others can then open the project

  • Here you go, I made a demo for you and added some alternating footsteps in too. Note that when using spawn action, you don't need to manually set the angle as this is inherited from the parent object. https://1drv.ms/u/s!AkmrWgxeuxlKhIcGbX082iysFbjS1Q?e=g0lxpA