Browse Search Popular Register Upload Rules User list Login:
Script OnCollide SPAWN CIRCLE

screenshot of the scene

Author: matto

Group: Default

Filesize: 1.82 MB

Date added: 2020-01-03

Rating: 6

Downloads: 1217

Views: 148

Comments: 11

Ratings: 3

Times favored: 0

Made with: Algodoo v2.1.0


Scene tag

Hi, do you want to see the video?

Do you want to see more?
Many other videos?
Do you want to visit my channel?

Last edited at 2020/01/06 22:20:04 by matto
Please log in to rate this scene
Similar scenes
Title: Need Help
Rating: 5
Filesize: 5.26 kB
Downloads: 110
Comments: 0
Ratings: 1
Date added: 2016/05/15 21:58:46
Made with: Algodoo v2.1.0
Rating: rated 5
Title: Proximity Detection Tutorial
Rating: 5.625
Filesize: 282.58 kB
Downloads: 678
Comments: 14
Ratings: 2
Date added: 2013/12/07 05:27:31
Made with: Algodoo v2.1.0
Rating: rated 5.6
Title: Portals: Level 001
Rating: 5
Filesize: 31.68 kB
Downloads: 437
Comments: 4
Ratings: 1
Date added: 2011/06/10 22:45:30
Made with: Algodoo before v1.8.5
Rating: rated 5
Title: Console and Oncollide Script
Rating: 6.1
Filesize: 29.37 kB
Downloads: 2489
Comments: 2
Ratings: 4
Date added: 2013/07/11 03:33:01
Made with: Algodoo v2.0.2 Edu
Rating: rated 6.1
Title: Ball mix
Rating: 5
Filesize: 36.32 kB
Downloads: 233
Comments: 4
Ratings: 1
Date added: 2016/02/13 03:46:10
Made with: Algodoo v2.1.0
Rating: rated 5
Title: my big question (inclueding ChaDomSom)
Rating: 5
Filesize: 20.38 kB
Downloads: 134
Comments: 14
Ratings: 1
Date added: 2016/03/18 02:32:56
Made with: Algodoo v2.1.0
Rating: rated 5
@matto -- Sorry, but I must say that this is a very bad example of how to use the onCollide event. This example of generating hundreds or thousands of circles has no practical purpose, and it can cause some serious lag when running this kind of script with an older or inexpensive computer. Most new users will be very disappointed with the results. Also, you are attempting to explain how to write a script to a beginner who has little or no programming experience, which is complicated enough to confuse them. If they continue to enter the wrong syntax for a command (for example), and the computer constantly shows errors or maybe even locks up, they will probably give up out of frustration because you say nothing about what to do when they encounter exceptions.

This is NOT the proper way to teach anyone how to write script programs. I know that you are trying your best to help others, especially new script writers, but you are going about it the wrong way. You should first learn how to teach before you attempt to teach anyone how to learn!

Please do not take this personally as an insult. I am only giving you some friendly advice.

Thanks! :)
Hallo @Xray!!!!!

I'm glad you wrote me.
Any advice is welcome.
Yes, you're right, the scene could have risked freezing the computer.
I chose to edit the file and make the scene safe.
Now there is no more risk of freezing or slowing down computers.
All objects generated by the scripts have low TimeToLive and disappear after a few seconds.
Thank you!!
matto - You misunderstood what I was telling you. Your method of teaching new users how to write onCollide scripts is WRONG! In your very first text panel you wrote: "The first step to using the On Collide script is to copy and paste an object into another object's script menu." NO, NO, NO! That method of using onCollide is almost never used by experienced script writers. When a new user reads that, they will believe that copy and paste an object into another object's script menu is the ONLY way to use onCollide, but of course it isn't. Many onCollide scripts have only 6 or 8 or 10 lines of script. Very simple! Your method makes using onCollide very complicated!

I'm not saying that you cannot teach this way, I just want you to understand that there are much better ways to teach scripting than the approach that you are taking. Please think about what I am telling you. Teaching a technical subject like this one is very difficult because we do not know the abilities and the knowledge that the new users have. Some are very smart and have no problem with technical subjects, and others, well, they simply cannot understand any technical information at all. I tried teaching some basic script writing here on Algobox a few years ago but I gave up after the first few lessons because of how difficult it was to do it correctly. Something for you to think about!
Last edited at 2020/01/03 17:19:10 by Xray
I don't know what the best way to teach thyme is, but I'm OK with the scene and video. The scene shows how to load predefined scripts, how to modify the scripts, and example results. Although this scene shows a subset of what can be done with scripting, it might be an OK introduction to thyme. The best feedback may be from users who are new to scripting. Once you know how scripting works, you can open any scene that has scripting and see if you can decipher the code. Xray, JakubKubo, Kilinich, and quite a few other users have scenes with good scripting.

Also see:
Thyme Command/Variables List
Thyme Tutorial - With explanations at every step
Last edited at 2020/01/03 21:59:49 by s_noonan
s_noonan wrote: "I don't know what the best way to teach thyme is..."

I don't know the best way either, but I'm pretty certain that it should (ideally) be taught in a classroom setting just as any other computer language would be taught. A novice student needs to understand the basics of things like data storage and manipulation, variables, constants, arrays, and some math before he/she can start learning how to write programs. They also need to learn the basic syntax of the language, or else they will have to deal with tons of exception messages.

Obviously we are faced with some difficult limitations here on Algobox which makes teaching scripting difficult to impossible. I learned Thyme scripting fairly quickly because of my previous programming experience, which is something that few users here on Algobox have. So, I think that the best teacher to have is the student themselves. They can learn a lot by seeing what others have done, and by asking questions. If a person is very serious about learning Thyme scripting, they will dig right into it, and experiment with "OPC" (Other People's Code). They can learn what works and what doesn't work this way, and they will learn a lot quicker and more completely than if they had someone attempting to "teach" them here.

Just my humble opinion.

Agree? Disagree? Let me hear your thoughts...
I strongly agree with your statement above. After consideration, I can see that I was over-simplifying learning thyme without considering the 30+ years of programming experience I had before joining Algobox. Learning the basics can save a lot of trial and error learning. Not understanding something as basic as variable scope can cause some hard to find errors. There's little harm with playing with Thyme without learning another language first, but it may make more sense to learn another language that is better documented. Python is my favorite programming language because it is concise, works cross-platform, and is well documented. Python syntax is different from Thyme, but the general concepts may be transferable.
Hello guys!!

I have read your comments and I completely agree.
Thanks, I don't have all this programming experience like you.
Over the years I have been very fond of Algodoo and have learned to "play" a bit with scripts by doing as you said.
I downloaded and analyzed other scenes.
I have learned without foundation to use some scripts, but surely my knowledge is superficial and incomplete.
Nonetheless, I had fun and had satisfaction in putting the little I learned about the scripts into practice.
Mine was an attempt to convey to those who, like me, are baseless, a method of approach that has been useful to me.
I didn't want to be an instructional teaching scene, but I wanted to help play with some scripts.
I understand that setting the scene as a "tutorial" is inappropriate.
I will modify the title, the thumbnail and the texts to make users understand that it is a script test without mathematical bases or specific language.
If you think it is better to delete the scene from Algobox, I will do it without problems.
Let me know what you think.

Thank you.
matto -- Thank you for your excellent comments. You have expressed exactly what people wanting to learn Thyme scripting need to hear. You mentioned what worked for you, and I believe that what worked for you will also work for most new users who have little to no programming experience.

As long as this scene doesn't violate the "Rules". I do not see any reason why it should be deleted. I will leave that decision up to you.

Thanks again! :)
Last edited at 2020/01/04 17:14:43 by Xray
matto -- The text in Sblock-6 and in Sblock-7 are exactly the same.
Thanks for warning.
Now it's okay.
I changed the thumbnail but the old one is still visible on Algobox.

Hello everybody!