spawning stuff, need help.

About advanced scenes, and the Thyme scripting language used in Algodoo.

spawning stuff, need help.

Postby jedi » Fri Jan 29, 2010 8:39 pm

Hello, i was doing some stuff and i come up with a problem, how do i spawn stuff like circle with collision B instead of A? how do i change it?
Iam new at all this scripting stuff :oops: so stupid questions may happen xD.
User avatar
jedi
 
Posts: 92
Joined: Sat Jan 16, 2010 7:36 pm
Location: Lithuania

Re: spawning stuff, need help.

Postby standardtoaster » Fri Jan 29, 2010 8:59 pm

When spawning the circle put collideSet := x. Where x is any integer between 0 and 128.

A = 1
B = 2
C = 4
D = 8
E = 16
F = 32
G = 64

Add and subtract those numbers to get the desired collideSet.

I'm guessing that this is something along the lines of what you are trying to do:
Code: Select all
Scene.addCircle({pos := e.pos; collideSet := 2; radius := 0.3})
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: spawning stuff, need help.

Postby jedi » Fri Jan 29, 2010 9:05 pm

Thank you very much. Without it i couldnt move on working on my little "project".
[most herp derp person of year 2252]
User avatar
jedi
 
Posts: 92
Joined: Sat Jan 16, 2010 7:36 pm
Location: Lithuania

Re: spawning stuff, need help.

Postby phunbox1 » Sat Apr 17, 2010 1:45 am

how do you spawn a circle with collision a and b????

im new to this
phunbox1
 
Posts: 4
Joined: Sat Apr 17, 2010 1:00 am

Re: spawning stuff, need help.

Postby Mystery » Sat Apr 17, 2010 2:48 am

If you read this you would know. That is literally the question answered.

Code: Select all
Scene.addCircle({pos := e.pos; collideSet := 3; radius := 0.3})

Collision group A = 1
Collision group B = 2
Thus A + B = 3
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: spawning stuff, need help.

Postby phunbox1 » Sat Apr 17, 2010 10:10 am

thnaks now i can make my wind tunnel!!
phunbox1
 
Posts: 4
Joined: Sat Apr 17, 2010 1:00 am


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 11 guests