Browse Search Popular Register Upload Rules User list Login:
Search:
Water2Ice

Image:
screenshot of the scene

Author: s_noonan

Group: Technical

Filesize: 207 kB

Date added: 2016-01-05

Rating: 6.1

Downloads: 1835

Views: 392

Comments: 6

Ratings: 3

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

I had originally made the scene where ice particles would create more ice when water hit them, but Algodoo kept freezing up.
Last edited at 2016/07/02 20:15:40 by s_noonan
Please log in to rate this scene
edit
Well done, i like it!! Thanks for the scene, :tup:
how did you find out about the type of the water to be undefined
and that you have to add a ""+ to the e.other, to get the handle
to it
{
otherType := "" + e.other;
(otherType == "undefined") ? {
scene.my.makeIce(e.pos)
} : {}
}

the makeIce-function i can find by unzip later and analyse it.

and how did you know about the Scene.addWater in
{
xPos := pos + [0.6, -0.5];
_waterOn && ((sim.time - _lastDrop > 0.2) || (sim.time < _lastDrop)) ? {
Scene.addWater({
vecs = [xPos];
vels := [[0.0, 0.0]]
});
_lastDrop = sim.time
} : {}
}

? was it all in forum and i didnt find it? Lol there should be
a nice review of all usefull thyme-scripts with examples, that
would serve many of us well.

Thanks again, DrBalk :tup: :tup: Super!
The addwater script is in the thyme variable/function list that's sticked inside the Thyme subforum. The trick about e.other/e.this + "" has been kinda found out by pro scripters and since then passed on over time to the people who tend to analyze thyme code in scenes. It bases on the fact that an object itself is containing a "name" of it's type, which can be transformed to a normal string by adding "" (an empty string) to it. You can even check if something is a square, a polygon, a plane etc. this way. It has been kinda discovered some time, and then people analyzed the scene and used it themselfes, and later on people analyzed these scenes and found that too, this way passing on the knowledge. Thyme is something you can sometimes not just find out like that xD
Awesome! :tup: 10/10
This combined with your chill pill would be even more awesome :yum:
Thanks guys.

DrBalk,

I see FRA32 did a good job answering your questions. Regarding "the makeIce-function i can find by unzip later and analyse it", there are a few other ways to see it:

1. Save the scene in Algodoo with a .phn extension and the open up the .phn file with a word processor.
2. Enter "scene.my.makeIce" in the console window.
3. In this scene, if you zoom out, you will see the scene.my.makeIce function text in a small box on the left. You will notice that the script to generate the text is 'text = {"scene.my.makeIce := " + scene.my.makeIce}'. I had made that box to make it easier to copy the function text.
Thanks to FRA32, s_noonan for the kind explainations!:)

I can use these tricks and knowledge well for my own, educational
scenes, actually i am working on ways to let students solve problems
with algodoo, enhancing the interactions by means of
"induced reactions", user will have to recharge his reaction-globe
with the correct type of energy to activate a "now-ready-to-use"
reaction with it at the place of this reactable object.
Timing-tricks like your "_lastDrop" and identifying of objects will
do some of the job for enabeling and selecting there.
In the end quite some usefull stuff for chemistry, physics, biology
may come out! :*)
Yup, with thyme one can do many things, ranging over a lot of subjects. That's why I mainly use thyme for my scenes, often for mathematical or entertaining purposes.