Dancingsunrise's Forum Posts

  • > > > > Use the condition called "Is overlapping at offset".

    > > >

    > > > My two objects are circles. If I use "Is overlapping at offset", the offset point XY can only detect one point. Is there a convenient formula? What I am using now is to compare the two values ​​​​distance (friendly circle.X, friendly circle.Y, enemy circle.X, enemy circle.Y) < (friendly circle.Width / 2) + (enemy circle.Width / 2).

    > >

    > >

    > > If you don't need to check at offsets then you should always use the normal condition:

    > >

    > > "Is overlapping another object"

    > >

    > > You will probably want to adjust swell the collision points of the circle if you need it to be 100% accurate instead of a Square box.

    > >

    > >

    > > If you need to check the offsets, the manual can help you in how it works:

    > > https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/common-features/common-conditions#internalH1Link10:~:text=Is%20overlapping%20at%20offset

    > "Is overlapping another object" is useless. These two objects use the "Physics" behavior. The "Physics" behavior can set the collision boundary to a circle. They cannot overlap and can only push each other. The manual shows that offset cannot solve this problem. there is no better way than to detect the distance between the two.

    I missed your second post where you mention the Physics, I apologise:

    My answer was for non-physical objects.

    If both objects have the physics behaviour then indeed the overlaps check will not work, as it will resolve the physics collisions first and push them apart, and by the time it checks for overlaps, it is too late.

    1-Distance check is a great alternative.

    2-You can also use invisible colliders as an alternative:

    Here is one example:

    https://www.dropbox.com/scl/fi/pq3f2ne6q2sjngo020bxp/1-Physics-Overlaps.c3p?rlkey=0pues73jekqf4fzyzdttl3q3w&dl=0

    Invisible colliders are really useful and are great for irregular shapes. Thanks for your reply

  • > > Use the condition called "Is overlapping at offset".

    >

    > My two objects are circles. If I use "Is overlapping at offset", the offset point XY can only detect one point. Is there a convenient formula? What I am using now is to compare the two values ​​​​distance (friendly circle.X, friendly circle.Y, enemy circle.X, enemy circle.Y) < (friendly circle.Width / 2) + (enemy circle.Width / 2).

    If you don't need to check at offsets then you should always use the normal condition:

    "Is overlapping another object"

    You will probably want to adjust swell the collision points of the circle if you need it to be 100% accurate instead of a Square box.

    If you need to check the offsets, the manual can help you in how it works:

    https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/common-features/common-conditions#internalH1Link10:~:text=Is%20overlapping%20at%20offset

    "Is overlapping another object" is useless. These two objects use the "Physics" behavior. The "Physics" behavior can set the collision boundary to a circle. They cannot overlap and can only push each other. The manual shows that offset cannot solve this problem. there is no better way than to detect the distance between the two.

  • Use the condition called "Is overlapping at offset".

    My two objects are circles. If I use "Is overlapping at offset", the offset point XY can only detect one point. Is there a convenient formula? What I am using now is to compare the two values ​​​​distance (friendly circle.X, friendly circle.Y, enemy circle.X, enemy circle.Y) < (friendly circle.Width / 2) + (enemy circle.Width / 2).

  • The collision can only detect the one that it hits.They use physics behaviors and cannot overlap

  • Where “else” is, remove the additional condition “=1”

    or add wait 0,1 before changing visibility.

    Thank you for your reply, I found the problem, there is a right click pathfinding action in another event table, I disabled it to solve the problem

  • When I left-click the SVG, the white image shows up,but when I right-click anywhere, I have to left-click the SVG twice to make it invisible.(if just left click, only need to click once)

    Tagged:

  • How is this initialization variable executed? Does it perform initialization when entering a scene with this event table? If I set a global variable to 1, will it still be initialized after switching other scene and then re-entering the scene?

    In addition, I want to know if the canvas size is equal to the visible area in the project properties, and whether each scene has a separate canvas size. If I want to increase the resolution to 4k, then I need to set the canvas size to 4k for each scene?

  • You can set the volume when you start playing a sound, or while it's still playing. Of course you can't change the volume of a sound which has finished playing.

    You can store the current volume in a variable, and use this variable in all "Play audio" actions.

    OK, thanks for u answer

  • Your sound is too short. When you are changing the slider, it has already finished. So changing "SFX" volume has no effect.

    But when you click "X" sprite, it plays at the correct volume set on the slider.

    I suggest using my example with log10() function though, because it's more accurate and allows to change the volume from 0% to 100%

    For short sound effects, can the volume be set only by using the value of the slider directly every time it is played, instead of relying on the global volume of the label?

  • Try this demo

    https://www.dropbox.com/scl/fi/5e5kyap5eqq6g7u1kfksb/VolumeSlider.c3p?rlkey=v8wsfcpi8nw7ntay3qpciod2o&st=htkkgsb6&dl=0

    Thanks for your help, your function is well written, I'd also like to know where I went wrong:https://www.dropbox.com/scl/fi/ei6itznvfr85fkjenke9n/2.c3p?rlkey=jfivwtn04268zhmk268gtinnn&st=5yex99t5&dl=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It works fine for me. Try using a bigger range, like -40 to 0 and see if it has a more noticeable effect.

    It didn't work, I also tried -100 to 0

  • I created a slider (named sfx) to control the volume of audio with the SFX tag, with a minimum value of -15 and a maximum value of 0. In the event sheet, I wrote:

    On slider changed -> Set volume ("SFX") to sfx.Value.

    However, this doesn’t work. I have a button that plays audio with the SFX tag, which I use to test the volume change, but there is no effect. On the other hand, I found that directly setting the volume to sfx.Value in the audio action works.