index based

This forum is currently in read-only mode.
  • How about we get back to 0-index based and not 0-index based with some things with 1-index based which supposed to make things easier for new construct users but it doesnt seem to work pretty good also annoys people with basic programming knowlage.

  • what?

  • I thought we all had discussed this in another thread... The point is to make everything uniform, as mixing 0-index and 1-index based features is too confusing, there would be MANY errors on the game developer's part. Imagine bug requests "MY GAEM NO WORK WYYYYYYY" etc. and it turns out some object is using different indexing etc.

    You can always add -1 to the 1-indexed stuff to make it 0, but that'd be complicating it needlessly. Sometimes we have to agree on a standard to stick to. 1 indexing is the chosen one.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Everything in Construct should be 1-based (loops, lists, arrays etc) except where manually specified (eg. you can still specify a For loop to run from 0 to 9, it's not going to change that). If you find anything operating as 0-based, report it as a bug - obviously we don't want a mixed indexing standard!

  • Everything in Construct should be 1-based (loops, lists, arrays etc) except where manually specified (eg. you can still specify a For loop to run from 0 to 9, it's not going to change that). If you find anything operating as 0-based, report it as a bug - obviously we don't want a mixed indexing standard!

    random() function reporting as bugged.

  • Oh... we had a discussion about that a while back, and decided not to change it. It'd break so many .caps in annoying ways. I think that one's the exception to the rule

  • wait... how is random() bugged?

  • wait... how is random() bugged?

    If you put random(10), it will return a number between 0 and 9 rather than 1 and 10. Though that's not so much bugged as it is a standard programming thing.

  • > wait... how is random() bugged?

    >

    If you put random(10), it will return a number between 0 and 9 rather than 1 and 10. Though that's not so much bugged as it is a standard programming thing.

    It should be index 1 based, i dont choose numbers to random pick, just range of numbers.

    Edit:

    Also if its index 0 based why it cant pick number 10 in random(10)

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