Underdog's Forum Posts

  • Thank you so much 99Instances2Go

    you just gave me another boost of energy.

    Have a great day/night

  • Sorry guys, I'm really stuck and I really need help for it please... Is it possible to achieve this result in CS2?

  • Hi everyone,

    I would like to create a magnifying glass that just scales up the part of the image that the mask covers.

    I tried for a couple days, scratching my head, to find a way to create a magnifying glass.

    I found an old post that suggested to use the Lens FX which was a good step but it created my problem that I don't know how to resolve.

    I understand that the Lens FX magnification scales the image (for example 300%) but my problem is it creates an offset.

    Is there a way to have a magnifying glass at a fix position with the zoom about what is show with the mouse?

    Also mentioned by dahu and kinetic ?

    The link below shows really well the expected result:

    http://thecodeplayer.com/walkthrough/ma ... css3?s=rlt

    Thank you everyone for your useful help.

  • Thank you 99Instances2Go for the explanation. This is great and well explained. Cheers!!!

  • 99Instances2Go

    I dont want to bother you but I was looking for more info on the expression like Touch.SpeedAt(0) // Touch.SpeedForID(0) in order to understand the formulas and learn what they are doing.

    Do you have a link where I can read this? When I search Touch or Touch.Speed , I dont find a link where they talk about those expressions?

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 99Instances2Go

    Thanks 99Instances2Go.

    This is great guys for the help. This is exactly what I was trying to do.

    I'm sure it will help a lot of more users.

  • R0J0hound

    Thank you so much for your reply and time R0J0hound

  • Hi guys,

    is there a way to drag a layout with Mouse/Touch but also add inertia without adding a sprite with a ScrollTo behaviour?

    I have no problem to drag the layout with the mouse/touch but can't find a way to add inertia if the Player scrolls his finger faster from dragging.

    Thanks

  • I found how to fix my issue that I was doing wrong.

  • Problem Description

    I tried to insert a new value "SUPER" in a 2D array on X and a value "100" on its Y .

    In the array, it duplicates "SUPER" (even if I add a value on Y axis)

    I might have done something wrong, since I'm not familiar with Arrays.

    Attach a Capx

    ____ sorry can't upload it ____

    Description of Capx

    Really basic. I have a 2D array and tried to insert a value in XY.

    When touched [Sprite]

    ArrayName >> insert "SUPER" at index ArrayName.At(index) on X axis

    Example:

    arrUnits >> insert "SUPER" at index arrUnits.At(arrUnits.IndexOf("unit5")) on X axis

    Steps to Reproduce Bug

    • Create a 2D array (XY) width 6, height 2, depth 1
    • On start of the layout, fill the array X & Y (with the value you desire. I used "unit0" to "unit6" on X and some values 1-100 for Y)
    • Add a touch event on Sprite
    • On touched Sprite, Insert "SUPER" on X and insert "100" on Y

    Observed Result

    ____ What happens? ____

    Notice that "SUPER" is written 2 times in the array (through the debugger)

    Expected Result

    ____ What do you expect to happen? ____

    Having "SUPER" written once, and 100 following SUPER

    like:

    index0: unit0,5

    index1: unit1,3

    index2: unit2,4

    index3: SUPER,100

    index4: unit3,2

    Affected Browsers

    • Chrome: (YES/NO) YES
    • FireFox: (YES/NO)
    • Internet Explorer: (YES/NO)

    Operating System and Service Pack

    ____ Your operating system and service pack ____

    Windows X Familly - Intel(R) Core (TM) i7-4770 CPU 3.4 GHz

    Construct 2 Version ID

    ____ Exact version ID of Construct 2 you're using

    Release 239 also tested in r243

    ____

  • Ok, I gave up trying to spawn new objects. I found another solution by using animation.

    I just Set Angle as already described and I set Width to distance(Startposition / Endposition) and play an animation in loop.

    Yes, it slightly deforms the blocks of the animation because we scale the width but the feel is there.

    I'm also thinking having different animations triggered by the distance in order to keep the blocks on the same size but, I don't know if it really requires it!

  • So... marching ants!

    I don't have an exact answer or time to work on this now... but if I were to try this, I think I would start with a lerp function for a straight line movement, and a qarp function for a curved line.

    Here's a reference - what-are-lerp-qarp-and-cubic-for-the-nonmath_t64198

    Hey Oosyrag,

    I tried different approaches with lerp and qarp, I still meet the same issue. Because my object (Bars) has a Bullet behaviour, when their angle change toward the new direction, they rotate from their pivot point. I don't know how to find a way to make them rotate from the same another point. I tried with Pin behaviour, creating a dummy object so I can pin my spawned object. But here again, they rotate around their image point (pivot).

    Here is a capx of what I tried for example:

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

  • Any help is always welcome

    Thanks, I will take a look at it.

  • Hi everyone,

    I try to create several objects from Touch Start Position that rotate toward Mouse Position.

    They also move toward Mouse Position.

    The issue is that I would like to change the pivot point of the created objects so they rotate from the Start Position. So, all my objects rotate and stay aligned.

    I tried several approaches such as Set angle(StartX,StartY,Mouse.X, Mouse.Y), tried Pin behaviour by creating a sprite from Start Position and Pin the objects in different modes such as Angle, Rope, Bar style and I can't make it work like I imagine.

    The idea is kind of simulating the same effect of the arrow in Hearthstone. I already did the example of the nice tutorial posted 2 years ago but it does not have the curve effect that I try to reproduce with animation.

    Thank you if you have any idea

  • Thank you Korbaach, your help was useful I understood the concept. It works well!