Constant777's Forum Posts

  • Use the Wake Lock feature of the Platform Info object.

    I will try. Thanks a lot!!!!!

  • Hi!

    How do I keep the screen from timing out while the game is playing?

    How to make the game keep the screen alive while it is running?

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Check out this demo

    https://howtoconstructdemos.com/customizable-rotating-knob-controls-capx/

    Hi! Thank you so much! this is exactly what I was looking for and even more! :)))) Thank you very much!!!!!!!!!!!!!!!!!!

  • Hi!

    I need to do rotation volume button with Sprite and rotate it by touching.

    Behaivior "Drag & Drop" dont have parameter "rotation", only vertical and horizontal.

    Behaivior "Rotate" rotates Sprite with some speed but not by touching.

    I need help :)

  • That should work properly. I'd suggest you have something else in your events that is interfering.

    show your project file.

    I find a problem.

    I think so because touching 2 sprites at the same time work, 4 - work, and 3 do not work.

    Android try to start make screenshot because of my settings: make screenshot when I scroll 3 fingers on screen.

    And once I accidentally managed to take a screenshot with three fingers.

    When I disabled the function in android to take a screenshot with three fingers, everything worked.

    Maybe it's an interestin thing for Ashley?...

  • That should work properly. I'd suggest you have something else in your events that is interfering.

    show your project file.

    I make clear project...

    and...

    yes, it works)))) thanks)

  • Hi!

    I have 3 GoodSprites.

    I need to destroy BadSprites overlaping GoodSprites when I touched them.

    It works when I touching 2 sprites at the same time,

    but it doesn't works when I touching 3 sprites at the same time.

    GoodSprites changing animation frames when I touch them,

    so I can see that 3 GoodSprites changing animation when I toching 3 sprites at the same time.

    But no one BadSprites destroyed.

    With Buttons the same situation.

    Please help me)

  • You do not have permission to view this post

  • ok, if you wanted to set the value 22 to a variable from your array here it would be.

    Set Testvariable to tokenat(Array.At(4,0),3,";")

    thank you very much! everything worked. I did a little differently and it didn't work because of double "(": tokenat(Array.At((4,0),3,";"))

    THANKS!!!!!

  • What does your array look like ?, I presumed you loaded the text file into an array at 0,0

    I have Array with such ";" separator

  • If you load a text file that contains 11;22;33;44;55;66;77;88 to an array, it will be at 0,0 I presume, so you can use tokenat to find 22.

    Set Testvariable to tokenat(Array.At(0,0),1,";")

    I just chek it by "tokenat".

    Now I've got "NaN" in "TESTvariable" :(

  • Hi!

    I have 2D array "2DArray" making by AJAX requesting .txt file:

    11;22;33;44;

    55;66;77;88;

    and I have global variable (type number):

    "TESTvariable"

    I need to set "22" to "TESTvariable"

    I make this:

    Set "TESTvariable" to 2DArray.At(0,1,";")

    But I've got a 0 to "TESTvariable"

    So I make this:

    int(Set TEST to 2DArray.At(0,1,";"))

    But I've got a 0 to "TESTvariable" again.

    How do I set data from array to global variable (type number) correctly?

  • You do not have permission to view this post

  • take a look at this thread from a few days ago...

    https://www.construct.net/en/forum/construct-3/how-do-i-8/put-commas-numbers-160413#forumPost1042464

    if you want spaces, just replace the comma with a space character.

    Thanks! I couldn't find it. it's brilliant but incomprehensible but it works )))

    Set text to RegexReplace( str(int(num)), "(\d)(?=(\d{3})+(?!\d))", "g", "$&,")

    instead of "num", need to insert a number.

  • > I just figured somewhere along the way, there would be an option/check-box, short code, etc that changed the format to include commas in numbers that were greater than 3 digits.

    Did you look at AllenR's example?

    > Set text to RegexReplace( str(int(num)), "(\d)(?=(\d{3})+(?!\d))", "g", "$&,")
    

    Then add

    > -> Text: Append "."
    -> Text: Append int(abs(num)×10)%10
    -> Text: Append round(abs(num)×100)%10
    

    to pad the decimals.

    I don't quite understand how it works. more precisely, I did not understand how it works at all. but it works! thank you!!!