dop2000's Forum Posts

  • Because the numbers contain commas, they are sorted as text, alphabetically. For example "209" goes before "21", because as a character "0" is less than "1".

    You need to remove commas in the array, then they will be treated as numbers. And then format these numbers before displaying them. For example:

    Set text to int(number/1000) & "," & (number%1000)

  • You need to import fonts you are using into the project. And then select them from this list:

    This way they will work on all devices.

  • Can you share a demo project?

  • There are also rope and bar pin modes which can't be done with hierarchy.

  • Thanks for the praise :) But the website was actually created and managed by dazedangels, who also contributed quite a few cool examples there!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm so sorry for the delay! lol

    dropbox.com/scl/fi/us9zxk9sim0bpg1x8wi0j/Q1-R3_dop2000.c3p

  • You probably need to store current scale value in an instance variable on the sprite. And use that variable instead of the fixed "0.5" number.

    Ship set scale to clamp(Ship.curScale+(Touch.X-ScaleX)*0.0090, 0.3, 1.5)

    When resizing is finished, save the new scale value to curScale variable.

    0.3 and 1.5 are the minimum and maximum values for the clamp() expression. See the official manual:

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

  • There is no bug. The engine needs to know which instance you want to compare, that's why you need to pick the correct instance. If you don't pick, then the first available instance is used and the result may be different from what you expect.

  • I don't understand why the family solution is not working for you. If you disable all other events you can see that it works fine:

    In this case the "Is overlapping" condition picks two instances - one Sprite1 and one Family. This allows to compare their frames.

    However, if more than two instances are overlapping, the event may not work. You will need to do more picking to select two specific instances for comparing.

  • Here is an example, but it may not be suited for your purpose because Physics is disabled during dragging. Which means that the object will not collide with other physics objects while you drag it.

    howtoconstructdemos.com/throw-a-physics-object

  • Press F12 in the preview window and check for errors in the console log.

  • It's still not working, What I'm doing wrong?

    You are not picking the right instances.

    Before you do anything with instances in Construct you need to pick them. Otherwise the engine doesn't know which instances you need. Imagine you have 1000 instances of Sprite1. Which ones the engine should select to compare their animation frames? Which ones should become visible?

    Picking is possibly the most important concept in Construct. I suggest you start by reading the official documentation and studying some tutorials.

    .

    The result showed that construct3 has a problem with comparing objects to themselves.

    igortyhon I don't see any problem in your example. The condition "Sprite1.AnimationFrame=Sprite1.AnimationFrame" is always true, which is expected.

  • anglediff but not sure how it will work when one value becomes negative

    Anglediff will work just fine.

    You can convert an angle to positive number using this formula: (angle+360)%360

    The result will be between 0 and 360. But I still recommend using special System conditions which are designed for working with angles.

  • suppose if I want to check whether both values are 185 or not. selfangle will show 185 but angletoplayer will show negative value when its supposed to be 185

    This is not a good idea, because the angle may not be exactly 185 degrees, it may be 184.999999999998 or something like that. So even if both angles are positive values, I still don't recommend comparing them directly.

    Use System conditions, for example "angleA Is within 0.5 degrees of 185". This will work with any angle values positive or negative, and will account for any rounding errors.

    Another option is to use anglediff expression:

    anglediff(angleA, 185)<0.5

  • With two instances of a sprite, but each instance having different frames.

    You can't compare two instances like that! When you use an object in an expression like that, only the first instance is checked. So you are comparing it with itself.

    If you want to compare two instances, you need to pick each instance separately. With a single object it's tricky, a common workaround is to use a family. Then you pick 1 instance of the sprite and 1 instance of the family, and compare Sprite.animationFrame=Family.animationFrame

    Another option is to use IIDs:

    Sprite(0).animationFrame=Sprite(1).animationFrame

    But you need to be sure that there are only two instances on the layout.