Download the 8 sprites and 15 scripts of "ScratchDynArr" and open it in Scratch
Project Notes
Scratch DynArr: Infinite Dynamic (Programmatically Created) 1-Dimensional arrays, in Scratch!
Simple UI Included (for demo)
Comes with these built-in functions (set the needed variables, then broadcast the function name):
- newArray
Provide the name with arrayOp_name; creates a new arrray with the given name and one (1) value, which is the default value (arrayOp_initialValue); returns true if successful and false if unsuccessful (in arrayOp_success?)
-deleteArray
Provide the name with arrayOp_name; deletes a previously created array with the given name; returns true if successful and false if unsuccessful (in arrayOp_success?)
-addVal
Provide the name with arrayOp_name; adds a value, which is the default value (arrayOp_initialValue), to the array with the given name; returns true if successful and false if unsuccessful (in arrayOp_success?)
-deleteVal
Provide the name with arrayOp_name and the index with arrayOp_valIndex; deletes the value with the given index in the array with the given name; returns true if successful and false if unsuccessful (in arrayOp_success?)
-getVal
Provide the name with arrayOp_name and the index with arrayOp_valIndex; returns the value with the given index in the array with the given name (in arrayOp_val), and true if successful and false if unsuccessful (in arrayOp_success?)
-setVal
Provide the name with arrayOp_name, the index with arrayOp_valIndex, and the new value with arrayOp_val; replaces the value with the given index (in the array with the given name) with the given value; returns true if successful and false if unsuccessful (in arrayOp_success?)
-getArray
Provide the name with arrayOp_name; returns the array with the given name (in arrayOp_array), and true if successful and false if unsuccessful (in arrayOp_success?)
Comments
You need to be logged in to post comments
Add a Comment