Possibly Array Bug, or just my in experience

0 favourites
  • 11 posts
From the Asset Store
Supports 1D, 2D, 3D arrays. Import and export arrays in JSON format
  • Link to .capx file (required!):

    empireofgames.net/bugreporting/ArrayIssue.capx

    Steps to reproduce:

    1. Execute and Click the keyboard button Q. It will than load the array,

    you will see the number 500 at the bottom indicating the array is loaded.

    2. Now Right click your mouse cursor, do it again

    3. It display sets of number in 3 columns. What I have is 9 boxes, and I want 8 boxes are in the boxfamily families group. I want to make it after all the array is deleted, I can sort or somehow find which one is not deleted and use that to load my 1 sprite image there.

    Observed result:

    The numbers listed to the left is from the while loop, I'm looking to

    find the Array index that has value in it because the other one should be deleted already.

    The last set of columns are numbers after they have been deleted, why is it still in the array showing up like that?

    Expected result:

    1. First column should show only 1 index that is not deleted

    2. Second column works fine, indicating the value before hand.

    3. Third Column I'm expecting it to have a 0 value in the array after it is deleted?

    Browsers affected:

    Chrome: no

    Firefox: no

    Internet Explorer: yes/no

    Operating system & service pack:

       Windows 7, 64 bit

    Construct 2 version:

    r114

  • It's hard to be sure this isn't just a mistake in your events. If there really is a bug in the Array object, it should be possible to demonstrate it in a new project made from scratch with just one or two events. Can you provide this?

  • Yes, it was actually from something a little bit bigger, but I left variables in there so it must of been a little bit confusing. I created a simpler one here. Just run it and Right Click and it will generate these boxes from the array position points. The delete before should display these coordinate in order from when they where picked. The deleted after should be 0? because its already deleted from the array. The While loops is suppose to go through the whole array, you can also do i <= Array.Width instead of just < than

    Right click once, and re-run the Layout Multiple times and look at the numbers.

    empireofgames.net/arraysimple.capx

  • Yes, it was actually from something a little bit bigger, but I left variables in there so it must of been a little bit confusing. I created a simpler one here. Just run it and Right Click and it will generate these boxes from the array position points. The delete before should display these coordinate in order from when they where picked. The deleted after should be 0? because its already deleted from the array. The While loops is suppose to go through the whole array, you can also do i <= Array.Width instead of just < than

    Right click once, and re-run the Layout Multiple times and look at the numbers.

    http://empireofgames.net/arraysimple.capx

    It could be a family bug or how the text field is bugged in that situation, The While loop I use on my other ones to find out which Array index was not used, because if say I have the Array Width loaded with 9 variables and I only use 8, I would while through and search for the 1 that still contains the coordinate(index not deleted)

    -Thanks for listening , you the genius.

  • I can't see any evidence this is a bug and not just your events working properly. If there really is a bug in the Array object's 'delete index' action, it should be possible to demonstrate it in a single event. Can you do that?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok the while loop didn't work correctly because I nested it, but I know thats not the problem.

    So it does work right, but as far as the index inside of that, I put a simpler one here.

    It seems like you are correct about something not being right about the delete index for arrays. The delete works if its indexinside 0 0 . Indicating that its at that index and value is deleted. Only sometimes does it work though.

    There is also a bug with it displaying the index number, why does it not display correctly. Sometimes it does display the indexinside correctly before the values.

    empireofgames.net/deleteindex.capx

    Hit Q for it to randomly generate indexinside for the array.

    Do it up to 5 time than restart layout and do it again.

  • It's working fine Gamezilla. The thing is that deleting the index removes it from the array.

    <img src="https://dl.dropbox.com/u/8367729/construct/pics/deleteIndex.png" border="0" />

    First time you hit 'Q' it deletes index 3 (99 44) and the array looks like this:

    0: 150 300

    1: 450 300

    2: 750 300

    3: 40 420

    As the 'After Delete' column shows, index 3 is now (40 420)

    Hit 'Q' again it deletes index 0 (150 300), index 0 is now (450 300) and array =

    0: 450 300

    1: 750 300

    2: 40 420

    Next deletes index 1 (750 300), array =

    0: 450 300

    1: 40 420

    Next deletes index 1 (40 420), there's no index 1 now so it shows (0 0), array =

    0: 450 300

    Next deletes index 0, array size = 0 now, index 0 = (0 0)

  • Wow Ramones, thanks for the example it surely clear things up for me. The index change after deletion, my assumption was that the array would put 0 value in it or something. I think instead of delete I might have to try to set it 0 0 at that index so that the index array does not change and I can do my thing. Not a bug you can close this Ashley, I think of it as a learning experience.

  • empireofgames.net/arrayindex.capx

    I changed it from deleting the index in the array to Set Value, can you tell me why its still not working after I set the value the after delete should be 0 right? I Set Value in it and it does not change the value of the array to 0

  • Gamezilla: You're not using a correct syntax to set the value in the array.

    <img src="https://dl.dropbox.com/u/36472942/construct/forumhelp/set_array_at.PNG" border="0" />

    This should do the work.

  • Alright cool, Do you guys have skype? I need/want to get a skype group together, and we can discuss all these things, building game engines, bugs, learning , and all that it be cool.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)