lightning_'s Recent Forum Activity

  • Friends, I need to learn how to set a condition like:

    If the textbox contains the word "apple"

    = Something will happen.and the text is something like this "Today I will buy apples and go home"

    I didn't like the expression "replace" for some reason it doesn't work in large texts

  • Not sure if I understood correctly but it looks like you want to encrypt the "a" and then decrypt back the "a"

    Maybe something like this?

    https://www.dropbox.com/s/xa9isi26qrs29z6/1-Encrypt.c3p?dl=0

    Yes, you understood correctly

  • Noticed another mistake in the "For X" loop - it should be from 0 to tokencount(..)-1

    Other than that I don't know what else can cause duplicate entries in the list. Add console logging to double check that Photon sends the correct data, and that this event only runs once.

    ок

  • There are no other places for sure. I already opened a new test project and there it was this part of my project, and there I also recorded several times

    You can try too

  • Friends, I need to see the player's ip address, how can I do this?

    I need this so that I can record his country and city in his own database of player information.

    I could not figure it out at all in the "Geolocation" plugin and it does not work when I make the condition that when the button is pressed, it will write the latitude and longitude of the player into the text.

  • Friends in my test project I wanted to try to encrypt text data using a "replace" statement.

    You write the text and press the "Submit" button.

    The text appears in the "text" plugin.

    Then when we click on the "Decrypt" button, the text from the text plugin goes to our other plugin "textbox" and it should decrypt the data from there.

    Now I'll tell you how I did it.

    You write let's say the letter "a" and it converts it to random characters and numbers. Here is an example of encryption.

    replace(Ciphertext.Text,"a","{${½g8w09eg64")

    And here is an example of decryption. It's just the reverse side of the encryption, I swapped the letter "a" and "{${½g8w09eg64"

    replace(Ciphertext.Text,"{${½g8w09eg64","a")

    Encryption works but decryption doesn't work.

    Here are the screenshots

  • Thanks to. I have been a member of this group for a long time. But why can’t you use a cycle in a cycle. As I understand it, the for cycle in a cycle where the cycle of the first action can already be completed and stop the "stop loop", then the second one will work without problems. problems arise, again based on my experience, as I understand it, if the first cycle does not end and the second one starts to work, then they intersect.

    And also I want to add that the photon did not send repeated data several times. I understood this by the fact that I output data from the variable into the text into which this data received from the photon "list of all people" was actually recorded

  • There are many elements in my 'list', but there are some of them several times and I need something under one instance so that they do not repeat

  • Friends, through the for loop, I send all usernames with "list" through photon and separate each username with the "_" character. After the user receives a list of all users, these names are added to his "list" again using the "for" loop with tokenat(event.data,loopindex,"_")

    But some names are added 2 or 3 times, that is, they will be added several times. I tried to stop the loop 0.5 seconds after the user names fit in there, but it didn’t work.

    By the way, empty elements were also added to the list, but I deleted them using the "for" loop.

  • System event, action: stop loop.

    Place it after the password checks.

    It likely fails if your name and pass checked out, and call the function, but before the function finishes, the loop perhaps checked the user in the array AFTER yours, and fires the failed function before the previous one was done.

    I interrupted the cycle and it helped. But it is necessary to break the cycle in 2 cases.

    When the user and password are found and when the user is found but the password is not found. and then everything worked great.

    And if you put it only after the password is found, then the server gave an error "user found but password is not correct".

    I advise everyone to break the cycles after their success and failure.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you. I will definitely try and write to you. All I will do is stop the loop after checking the password

  • How can I break the cycle? and why does he fail, if his name is on the list, he must find it. and for some reason it finds and everything works well when there are less than 3 registered users

lightning_'s avatar

lightning_

Member since 19 Apr, 2021

None one is following lightning_ yet!

Trophy Case

  • 3-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

6/44
How to earn trophies