Replies: 1 comment
-
Maybe it's better to use JSON? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
An extension similar to the numerical encoding extension, but instead allows to read and write CSV strings.
An example of a practical use for this would be taking two lists,
particleEventsX
andparticleEventsY
and being able to combine them into one list,particleEvents
, containing both x and y values in a single item on the list.given a string
30|100|90|
, the[read value]
block could be used like so:[set CSV to (string)]
[read value]
- reads first value 30[set x to (value)]
[read value]
- reads the next value 100[set y to (value)]
[read value]
- read final value 90[point in direction (value)]
To be more flexible you could even make a
[write (value) with discriminator ( | )]
but it might be inconvenient.PS: This is already possible in vanilla scratch with custom blocks, but I thought it would be convienient to shorten them down to an extension so you don't need to copy the
![image](https://private-user-images.githubusercontent.com/91437192/237265304-9d31c7f1-5274-480a-a533-b6fd52b5b916.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMzUyNzEsIm5iZiI6MTczOTAzNDk3MSwicGF0aCI6Ii85MTQzNzE5Mi8yMzcyNjUzMDQtOWQzMWM3ZjEtNTI3NC00ODBhLWE1MzMtYjZmZDUyYjViOTE2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDE3MTYxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZkNmQ5YzI0YjhjNjQ2OGMyNGU4YzJkY2VhY2FmZGQ5Y2MyODNlMjhjYzExMTNiZDE2MWZjYzc3N2Y3NTA1MTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.t0fZdQLKZzypEoxLXyZ6lRpBtS7RNgQuOUQKWhxieds)
define
scripts for each sprite you want to use it inBeta Was this translation helpful? Give feedback.
All reactions