kriand's Recent Forum Activity

  • Hey tunepunk

    if your variable is a number, it needs to have a value. If it is a String you can take "".

    But what do you want to achieve?

    If you want variable A to stay the same when the condition is not true, you can put A to the else condition: 100+X > Y ? 20:A

  • Hello trainstation

    make sure that you set all collision polygons of your animations and frames properly.

    Second, check the origin of ALL your frames. In platformers, the origin is usually right under the feet of the character.

    To go back to Idle, you could use the condition 'Player is moving'(invert) -> set animation "Idle"(play from beginning).

  • Hey PremiumOxygen,

    here is an example .c3p. May not be bug free or polished, but you can use it to start.

    1drv.ms/u/s!Ap_-qxoGKbDcg1ITyGR1MGy8BVPp

  • Ups, the changeover seems to have deleted a few posts.

    So here again. Cant see your link anymore, but i will try without:

    Your first event on the screenshot is triggered when Sprite19s health is <=200.

    If this is true, the event runs every tick (~60 time per second) and the animation

    starts every tick from the beginning.

    You have to add another condition, to trigger this event only once. Easiest way would

    be 'Sprite19 is NOT playing animation "Demon"' (leftclick on the condition and invert).

    If you want some actions from this event to run every tick, you can create a sub-event

    and place the mentioned condition and all actions you want to run only once in there.

  • Hey Merlinus

    i dont know if this is the cause, but you can click objects, even if they are invisible.

    Make the condition like: 'On click on XY' and 'XY is visible'

  • Hey jasskr,

    you can not edit animations while the game is running.

    You can copy the animation and delete the frame you dont want.

    Then change the animation when needed.

    Another more complex but flexible method would be a custom animation,

    where you set the Speed to '0' and go through the frames via events.

    Here a .c3p and screenshot:

    1drv.ms/u/s!Ap_-qxoGKbDcg1Afh6yGzlR6Uynf

    orig00.deviantart.net/11f4/f/2018/150/5/3/customanimationframeskip_by_kriand-dccypr3.jpg

  • Hey JayH

    Here you can test if dt works. If you have a supercomputer, you have to increase the particle number even further <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    I am sure, as soon as a value is multiplied by dt, it is framerate independent. No reason to worry.

    The only exception would be "Every dt seconds", where it reverses into dependency.

    https://1drv.ms/u/s!Ap_-qxoGKbDcg0zxCpBkPj6Vc1Hj

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey Steveanderly

    As far as I'm concerned, your animation events start every tick anew. That's why nothing happens.

    Create an extra trigger to change the animation and take as a condition e.g. > Is NOT playing "AttackF" <

  • JayH

    if i am not mistaken, it should suffice to change the last part of my example as follows in order to achieve framerate independence:

  • This can not work.

    Here's an example of lerp: lerp (10, 20, 0.5) = 15, so 50% between 10 and 20. The last value in the lerp function must be between 0 and 1 (0% -100%).

    When you use "Player.X + 32", you run after yourself, because if the player moves 10 pixels, the second value increases by 10 too.

    You would have to set a target value beforehand: lerp (Player.X, DestinationX, var). The last variable would then have to increment „slowly“ from 0 to 1 to move OVER TIME from Point A to Point B.

    But your event runs only one tick when you use on press the button or he moves infinitely when you hold down the button.

    That is so complicated and inaccurate. I do not know if anyone has a better idea to use lerp right here, but I recommend you just try the code from my screenshot or get it here for C3:

    https://1drv.ms/u/s!Ap_-qxoGKbDcg0v3iWcZn69XQycl

  • Hey JayH

    you can try this. The disadvantage of pixel-precise movement is that only certain speed values can be chosen.

    EDIT:

    I have added two decimal numbers as possible speed values. Since decimal numbers can not be calculated 100% exactly,

    the final result is not exactly 0. Therefore the margin of 0.01 in the conditions and round up of the player co-ordinates.

    This 4-Directions movement should be well suited for games like the old Pokemon editions.

  • Hey MomaFugger

    make sure that you have activated "Static" for your local variable.

kriand's avatar

kriand

Early Adopter

Member since 28 Mar, 2017

Twitter
kriand has 2 followers

Trophy Case

  • 7-Year Club
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

9/44
How to earn trophies