Array out of bounds should not return 0

Discussion and feedback on Construct 2

Post » Tue Aug 27, 2013 11:43 am

But anyways, something has to be done with this, because if your game is heavily based on arrays calculations, it's inevitable, that you stumble upon this issues.

Custom out of boundaries value is the best solution.xoros2013-08-27 11:47:26
B
45
S
11
G
4
Posts: 517
Reputation: 7,393

Post » Tue Aug 27, 2013 12:26 pm

You can already do custom out-of-bounds values by accessing the array using a function from the Function object, and implement your own bounds checking in events.

I really wouldn't want to change the existing value, mainly because it would break lots of existing projects, but also because any value could be a useful value in someone's project. -1 isn't somehow less of a valid number than 0.
Scirra Founder
B
395
S
232
G
88
Posts: 24,368
Reputation: 193,746

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: mihirolover and 2 guests