![Algodoo tutorial](https://kumkoniak.com/92.jpg)
![algodoo tutorial algodoo tutorial](https://i.ytimg.com/vi/cpV95T0fsSk/maxresdefault.jpg)
![algodoo tutorial algodoo tutorial](https://i.ytimg.com/vi/TSInOgfmpTY/maxresdefault.jpg)
Ok, so, in the teleporter's oncollide, type in (there's explaination in the code) (also, this code is sightly different than the one i use, to make it easier to understand): (e)=>) I recommend you to type all of these yourself, as typing instead of copying help you learn quicker :) It is to help us change a variable in a list without the need to type 10 lines of code.Įz, right? But now, the hardest part : Scripting. Lastly, the _change function is just to help us save some time. For example, if 3 red marbles and 1 orange marble reached, _num :=. For example, _l :=, then red marbles (1) should go to the marble holder with entityid 51, oranges (2) to the one with entityid 32, and so on.Īnd secondtolast, _num is to hold the number of marbles of a color that had reached the end. It i used to hold the marble holder a color should go to. Else, teleport it to the color's marble holder. If no, find an empty marble holder for the color. The _islist is to check if a color reached the end before.
![algodoo tutorial algodoo tutorial](https://i.ytimg.com/vi/xvAVQ6GEv-E/maxresdefault.jpg)
So before we continue, here's some explaination:
![Algodoo tutorial](https://kumkoniak.com/92.jpg)