VertexZero's Recent Forum Activity

  • Thanks, that helped, but I'm still facing the problem in which once I delete an item, the next added item wont go to the empty slot, but rather continue.

    I know why this is caused, but I cant figure out how to do it otherwise.

    Should I do a For each in the array to check for empty slots?

  • Thanks for the reply.

    I compared both values:

    array_inv.CurX & invItem.slot_ID

    But I can only destroy the first item. And subsequently, I cannot get a new item in the empty slot.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi guys, first, I did search about arrays used in inventory systems, but I tried and I didn't find a way to do what I need. So I apologize in advance if this question has been asked often.

    This is my .c3p file:

    https://drive.google.com/file/d/1UxEKv7gAtbENpcKwEM51UVSBSAMXBsqJ/view?usp=sharing

    So basically, I need to add an item to an inventory slot, and then add it into an array as well.

    Which for now seems to work. Now the problem arises when I *use* an item (for now I tried destroying the item). So you end up with an empty slot anywhere in the inventory, which subsequently should be filled by the next item you find.

    How can this be accomplished?

    Thank you.

  • https://drive.google.com/file/d/1PNc3s3GxJoFAn_cfEOoo0Bfs_cqhWGKY/view?usp=sharing

    I found the error, I was saving the phone number blocks into int instead of str.

    Now, I have another problem, I seem to be unable to change a valid area code for another valid one (located in an array)

    Alternatively, I tried comparing a value through a path in JSON ( in this case, Canada.area, but this didn't work.

  • I came across another issue, probably caused by how I did RegexReplace.

    If you have zeros at the end of the number (e.g. 450-444-0000)

    The number displays in a weird way.

    Like this: (450)-444-0

  • Not at all, if there's better way, by all means. I agree it's rather cumbersome and I will for sure come across other issues.

  • I tried in both my original file and the one that was corrected. I changed the values from = to

    =3, >=7, and >=10.

    And when the phone number is fully entered and I click to modify, the number I enter goes straight to the end of the number.

  • Yes, the problem is not visible if you correct numbers as you type. But once the number is completed, values changes end up at the end of the number.

  • When editing though, if lets suppose I would like to edit a number in the middle, it will send it instead to the end.

  • blackhornet Thanks! Didn't see your reply before, sorry.

  • Ah, it was that. I should either drink more coffee or bang my head against a wall hahaha.

    Thanks.

    And sure, what I'm trying to do is to format the phone number input by an user. Its merely for aesthetics, so the user can see if their phone number is correct or not.

    Underneath, we save the phone number as string and use it to connect to an external app.

    Then, in our server, we connect with the app using something like this:

    .../chatbot/stream?userId=%2B12223334444&chatbotId=title

  • yme that works perfectly, thanks! What was the problem with RegexReplace?

    Previously, whenever I added block3, I would get something like (555)(555)(5555)(555)

VertexZero's avatar

VertexZero

Member since 13 May, 2013

Twitter
VertexZero has 1 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies