Yes that would be amazing! It would make so many things much easier
Yep, that’d be great!!
As accurate as possible!
Thanks!
What’s an array/list/collection in coding?
var a = ["Google","Apple","Microsoft"];
alert(a[0]);
Useful for certain functions in more complex use cases. My JavaScript would alert “Google”.
Arrays are a list of values in a specific order. An example of an array would be in Hopscotch json files how things like abilities or scenes are stored. Usually the first item in an array can be accessed by something like array[0]
, but sometimes the first item is 1.
- Keeping track of grids for games. This could be used in a whole bunch of a projects. The only one I’m currently working on is a puzzle game with a grid which can have 5 states: Not selected, selected, marked as should not be selected, and automatically selected. I could use lists to say what they should be and probably also what they currently are. Right now I have all the code in the grid object where each square object (which is a clone) is the only object that knows its current state/goal state. With lists, all of that could be in the original object, the only code the clones would need would be setting color and changing the list. It would also make checking if the ouzzle is solved easier.
- Using long codes to save game progress
- Being able to make lists for an individual object would be cool too, and could be used for things like
- Having a clone navigate around obstacles to a certain point
- Having a clone keep track of targets it wants to attack
- Some game ais would be easier
- Shopping list
Yes, it’s correct.
Please keep in mind that we do not want to turn Hopscotch into a JavaScript madhouse.
That was from almost 10 months ago, I don’t think it needs to be answered now?
Dude, you just give people the option to use typecasting if they want to. It would just allow pro users to do insane things without hurting new users.
Bump
this would be awesome
yess
This would make some projects 100000% easier to code
- Where should I put the doors to exit this room?
- Which doors should be locked?
- How are the doors unlocked?
- Where should you put the keys?
- Which characters are unlocked?
- What can the current character do?
- What levels are finished?
- What structures have been built?
- What moves have been made, so I can make a replay of the whole game?
- How many points does each player have?
And this doesn’t continue eaither
ehh it’s kind of possible to do this with strings I guess but it would be much more easy if it was a thing