99Instances2Go's Forum Posts

  • But, you have done 'it' ?

  • 'Jump' only happens when the 'jumper' is standing on a solid.

    The 'Double Jump' happens when the 'jumper' is in the air. I suppose that this is what you are looking for.

    https://drive.google.com/open?id=0B1SSu ... VBuUFFBWDA

  • Your assuming is as good as mine.

    I assume that poeple who ask how lerp works, ask how lerp works.

    Lerp, when used with a liniair lerpfactor, wil indeed move at a liniar speed. So yes, you are right.

    But, lerpfactor can as well be sqrt(abs(counter – 1)) ... where 'counter' goes from 0 to 1

    Lets split things up. Lerp can (indeed) in two ways.

    Method 1.. lerp(StaticStart,StaticEnd,DynamicFactor)

    Method 2.. lerp(DynamicStart,DynamicEnd,StaticFactor)

    Method 1 is (in my opion) the base-lerp, the base to learn.

    Awesome to do grid movements, by instance. Base means also that it has no 'side effects'. It works as intented. And it is very easy to use.

    Method 2 is (in my opion) a version that brings problems that have to be countered. Yet, you will have to use it when Start or/and End has a dynamical character. Not because of the smooting. In my opion that is mis-use. And yes it smooths, but more by accident, than intended. But you will have to take care of the problems.

    Dynamical character ? When lerping a moving sprite to a moving sprite.

    (In the above given situation Start and End are not dynamical)

    What problems you will meet ? (you suggest to use this method, but dont tell about the problems)

    Well,

    The lerp will never ever arrive to its endpoint. Causing all sort of problems, that fill the forums. When lerping a camera, the camera will start shaking when the lerp is close to its end.

    When close to the End, the value returned by the lerp will change in very very small amounts. Since positions and angles are always 'calculated values', this will result in randominess on sub pixel level. You see shaky sprites.

    Most people use 'lerp' in a 'every tick' event. But since this lerp never arrives, and since the calculations get slighty heavyer, this lerp will just run every tick and it will eat noticable CPU.

    That are my 10 cents, dont know the exchange rate.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I am not ! Containers are just the max.

    For the future. If you need to pick newly created objects. Do this easy littlle trick.

    Give them a Instance Boolean 'JustCreated'.

    Right after the creation action (or spawn) set the boolean to true.

    A new top-level event.

    Condition ... Sprite ...Is Boolean Instance Variable Set .... 'JustCreated'

    (+ all the pick conditions you need)

    Actions ... set 'JustCreated' to false ... and all the other actions you need

  • First thing that i think to notice is that you try to pick newly created objects before the next top-level-event. A function does not count as a new top-level-event.

    I really think that you should use containers for this kind of stuff.

    This 'overlap' solution is totaly not needed when using containers.

    I dont know if you have more instances of the array 'party' ?

    You should destroy them all, and then create only the pokemonback in a loop. When using containers, the others get auto created and picked. Then position them as you do in the first lines. Then (still in the same event and in the same loop) give them the values from the array. Dont use the function, because in the function you will have to pick them, which is impossible on that moment.

    Drop the capx if you want me to do it.

  • Post links like this ....

    tutorials/997/how-to-code-monster-loot-drops

  • Look in the debugger. Bring the Dummy as far most left as it can go. What is the Value on the X for the Dummy ?

  • Somone shared it in the post before yours.

  • Did your dummie walk to negative position values ?

    I suppose not. Dummy stayed in the layout. And layout starts at (0,0). But you spawn at negative value.

  • Thank you for your reply. What I want to do is when I sustract the player's life the bar goes down with lerp.

    Any difference between 'up' or 'down' with lerp? You wanted 'lerp' and that is exectly what i gave you.

  • And the needed code will multiply out of control.

    Just give them a instance variable ... text .. 'name' .. and name them in the layout editor. (without " "'s)

    Then just use

    Sprite font > Compare Instance Variable > 'name' = whatever you named it between " ".

    Now that sprite font is picked, and actions run on that sprite font.

  • 2 layouts. 1 called "one" & 1 called "two".

    Go to (layout) choose("one","one","two","one","one")

  • Using a sprite or a progressbar

    https://www.dropbox.com/s/f21kzgvfnt9ih ... .capx?dl=0

  • 99Instances2Go, no you can start at 0 if you Push. Try it.

    Indeed. Thx for telling me wrong, i do apreciate that.

    Updated:

    https://drive.google.com/open?id=0B1SSu ... nFud1YxVDQ

  • Oh i smiled, and took that compliment gratefully.

    Don think that 0,1,1 works, arrays with 0 on any axis are 'locked'.