Browse Search Popular Register Upload Rules User list Login:
click if you wanna learn scripting

screenshot of the scene

Author: falandysz

Group: Default

Filesize: 33.7 kB

Date added: 2010-11-29

Rating: 5.7

Downloads: 510

Views: 754

Comments: 12

Ratings: 3

Times favored: 0

Made with: Phun


Scene tag

hello if you want to learn a script or 2 or 10 or so just ask in comment or look at those scripts beneath this text...

(e)=>{ e.this.density=e.other.density } density can be changed to almost anything restitution, airfrictionmult, friction, attraction or other the 2 densities/other don't have to be the same you can make a circle hit a box and get the box density

(e)=>{scene.addcircle ( { pos=e.pos; density:=12; color:=[0,0,0,1]; attraction:=3; radius:=4; oncollide=(e)=>{scene.addbox({ pos=e.pos; density:=13; color:=[0,1,0,1]; length:=2; height=:1 }) } } ) }that will spawn circles that spawns boxes :tup: try playing around with the valus and variables :tup:

some of the scripts used for... well something

(e)=>{ e.this.density=e.this.density +2; e.this.oncollide=(e)=>{e.this.density=e.this.density +2; e.this.oncollide=(e)=>{ e.this.oncollide=(e)=>{} }} } that will change a density to its own density +2 every time it hits something but with the extra scripts it will do it 2-3 times before loosing all effect :tup:

(e)=>{ e.this.texture=e.other.texture } if having something like a textured box you can use this script on a circle or so and when it hits the box it will get same texture :tup:

to spawn a box use size:=[ 1, 2 ] or so to tell size

and to spawn a tracer use scene.addpen({ the script you want })
and please rate this scene if I have helped you in any way :tup:

you can also add me on Skype (my Skype name is casper418161) or msn (my email/msn name is
Last edited at 2010/12/04 21:44:25 by falandysz
Please log in to rate this scene
Similar scenes
Title: The little scripting 1X1 (tutorial)
Rating: 5
Filesize: 44.27 kB
Downloads: 387
Comments: 2
Ratings: 3
Date added: 2010/12/27 21:06:45
Made with: Algodoo before v1.8.5
Rating: rated 5
Title: The Absorber tutorial
Rating: 6.3
Filesize: 242.45 kB
Downloads: 441
Comments: 3
Ratings: 4
Date added: 2010/11/22 17:49:55
Made with: Phun
Rating: rated 6.3
Title: Algodoo basics I: Newton's Laws
Rating: 5
Filesize: 30.6 kB
Downloads: 158
Comments: 0
Ratings: 1
Date added: 2018/09/20 00:50:25
Made with: Algodoo v2.1.0
Rating: rated 5
Title: A simple suspention tutorial
Rating: 5
Filesize: 40.43 kB
Downloads: 968
Comments: 7
Ratings: 8
Date added: 2013/03/16 21:52:09
Made with: Algodoo v2.0.2 Edu
Rating: rated 5
Title: Known physics and what we have left to learn
Rating: 5
Filesize: 58.14 kB
Downloads: 115
Comments: 1
Ratings: 1
Date added: 2021/02/13 02:28:56
Made with: Algodoo v2.1.0
Rating: rated 5
Title: Screen GUI Scripting Tutorial
Rating: 5
Filesize: 26.11 kB
Downloads: 156
Comments: 0
Ratings: 1
Date added: 2016/09/17 22:59:38
Made with: Algodoo v2.1.0
Rating: rated 5
I can teach too. Add my
yeah i know that _o_ :y
Ive been trying to find a way to learn how to spawn boxes, im somewhat new and im not sure how that works.
I will try to explain... in the oncollide text box type something like (e)=>{ scene.addbox({pos=e.pos; density:=12; size:=[1,2] }) } that should if spelled right spawn a box higher than it is wide :tup: you can maybe add something like this to spawn a certain amount of the box... (e)=>{ for(13, (i)=>{ spawn-script }) } that will spawn 13 of a box or circle depending on which script you use :tup:

just ask if I didn┤t explain it good enough or if you have other questions?
Last edited at 2010/12/11 11:12:47 by falandysz
Alright, i think i got it. I tried it and it it spawned into a box. If i put scene.addcircle( etc. would it spawn a circle or is there another code i have to put in? Sorry, im kinda new at this and im only 14 and maybe thinking about engineering so i figured this would be a kinda cool way to get familiar with physics.:)
well I am only 13 years old but I also plan becoming engineer but the answer to your question is YES...

but with circle use radius to tell size instead of height and length :tup:

(e)=>{scene.addcircle({pos=e.pos, radius:=2})} something like that :tup:

you can also spawn hinges springs tracers and so just use the name for the different stuff like reversed that way it is spelled in the script page of a normal one :tup:
Last edited at 2010/12/02 15:03:06 by falandysz
Thats cool, engineering is just something im interested in because of i love working with my hands and like to know how things work.
and alright. so to spawn a tracer what would be the code?
the code would be (e)=>{ scene.addpen({ size:=1; color:=[0,1,0,1]; }) }
alright. thanks much.
add me on skype my username is casper418161 :tup: then it is much easier to help you :tup:
To Spawn Anything!!
1. Select Anything You Want To Spawn
2. Press Ctrl+C
3.Goto Notepad And Press Ctrl+V
4.Select All And Press Ctrl+C
5.Goto Phun And Goto Oncollide Script And Press Ctrl+V
If You Want It To Spawn Right Where The Spawner Is, Change The Pos To [e.pos]
I really need the script to spawn multiple circles at once. I tried using your (e)=>{for(13, (i)=>{scene.addcircle{pos:=e.pos; radius:=1; color:=[1,1,1,1]}})} but it didn't work. can you please explain this again? :(