Changing collisionset on collide

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

Changing collisionset on collide

Postby docg » Thu Mar 11, 2010 12:41 am

e.geom.collideset = X
Doesnt work when collide
Never mind
NVM
Last edited by docg on Fri Mar 12, 2010 4:15 am, edited 1 time in total.
docg
 
Posts: 17
Joined: Thu Nov 12, 2009 12:31 am

Re: Changing collisionset on collide

Postby KarateBrot » Thu Mar 11, 2010 12:44 am

you have to use e.this. or e.other.
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: Changing collisionset on collide

Postby cellers » Sat Mar 27, 2010 6:21 pm

use := to set collideset
Russian Elite Forces :D
Now, in case of war, I can go to Airborne.

Image
User avatar
cellers
 
Posts: 145
Joined: Fri Mar 26, 2010 5:32 pm
Location: Russian Federation

Re: Changing collisionset on collide

Postby Chronos » Sat Mar 27, 2010 6:24 pm

cellers wrote:use := to set collideset

No, you don't. Only if you're spawning it. KB already told him the answer.
TheWinkits wrote:They both looks of cuking amazing
User avatar
Chronos
[Most Active Member 2010]
 
Posts: 4457
Joined: Mon Aug 31, 2009 6:00 pm
Location: Californania

Re: Changing collisionset on collide

Postby cellers » Sat Mar 27, 2010 6:40 pm

Chronos wrote:
cellers wrote:use := to set collideset

No, you don't. Only if you're spawning it. KB already told him the answer.

It is safer to use ": =" in both cases.
Russian Elite Forces :D
Now, in case of war, I can go to Airborne.

Image
User avatar
cellers
 
Posts: 145
Joined: Fri Mar 26, 2010 5:32 pm
Location: Russian Federation

Re: Changing collisionset on collide

Postby Chronos » Sat Mar 27, 2010 7:22 pm

No it's not. := isn't for that. := is for spawning (and a safer way to create variables). Not for changing an pre-existing variable.
TheWinkits wrote:They both looks of cuking amazing
User avatar
Chronos
[Most Active Member 2010]
 
Posts: 4457
Joined: Mon Aug 31, 2009 6:00 pm
Location: Californania

Re: Changing collisionset on collide

Postby cellers » Sat Mar 27, 2010 8:23 pm

Chronos
No difference. things that are for anything you can use for other purposes
Russian Elite Forces :D
Now, in case of war, I can go to Airborne.

Image
User avatar
cellers
 
Posts: 145
Joined: Fri Mar 26, 2010 5:32 pm
Location: Russian Federation

Re: Changing collisionset on collide

Postby Mr_Stabby » Sat Mar 27, 2010 9:09 pm

difference is it spams algodoo console then corrects your code assuming its a typo which costs performance
Mr_Stabby
 
Posts: 155
Joined: Wed Dec 16, 2009 12:16 am

Re: Changing collisionset on collide

Postby cellers » Sat Mar 27, 2010 11:10 pm

Mr_Stabby
So we must ask
programmers to make algodoo correcting code once.
Russian Elite Forces :D
Now, in case of war, I can go to Airborne.

Image
User avatar
cellers
 
Posts: 145
Joined: Fri Mar 26, 2010 5:32 pm
Location: Russian Federation

Re: Changing collisionset on collide

Postby Chronos » Sun Mar 28, 2010 12:42 am

Or maybe you should just use the right symbol.
TheWinkits wrote:They both looks of cuking amazing
User avatar
Chronos
[Most Active Member 2010]
 
Posts: 4457
Joined: Mon Aug 31, 2009 6:00 pm
Location: Californania

Re: Changing collisionset on collide

Postby RicH » Sun Mar 28, 2010 1:42 am

Plus, it's also a way for Algodoo to know whether you're declaring a new variable or simply just changing its value.
Last edited by RicH on Sun Mar 28, 2010 1:11 pm, edited 1 time in total.
Millions of voices suddenly cried out in terror, and were suddenly silenced. Something terrible has happened.
User avatar
RicH
[Funniest Person 2010]
 
Posts: 2043
Joined: Tue Sep 01, 2009 9:01 am

Re: Changing collisionset on collide

Postby Mystery » Sun Mar 28, 2010 9:18 am

Yes, a good example of this is when creating variables.
Thyme is a language like English or Russian, Algodoo registers thyme as if you i were talking to it in plain English, if i were to say "change density to 11" that would make perfect sense. If i were to say "Create a variable called density and make it 11" For obvious reasons it would be very confusing.
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: Changing collisionset on collide

Postby cellers » Sun Mar 28, 2010 12:38 pm

Mystery wrote:Yes, a good example of this is when creating variables.
Thyme is a language like English or Russian, Algodoo registers thyme as if you i were talking to it in plain English, if i were to say "change density to 11" that would make perfect sense. If i were to say "Create a variable called density and make it 11" For obvious reasons it would be very confusing.

Poor example, I think.
You can speak in English or in Russian, using many different words, but the script just two words that means "assign the value" and "create and assign the value"
Russian Elite Forces :D
Now, in case of war, I can go to Airborne.

Image
User avatar
cellers
 
Posts: 145
Joined: Fri Mar 26, 2010 5:32 pm
Location: Russian Federation

Re: Changing collisionset on collide

Postby Mystery » Sun Mar 28, 2010 1:24 pm

{e.other.post == rebuttal }?{e.this.post = "Bah! its still a language"}:{e.this.post = "I'm glad you agree with me"}
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: Changing collisionset on collide

Postby cellers » Sun Mar 28, 2010 1:40 pm

Mystery wrote:{e.other.post == rebuttal }?{e.this.post = "Bah! its still a language"}:{e.this.post = "I'm glad you agree with me"}

:clap:
Russian Elite Forces :D
Now, in case of war, I can go to Airborne.

Image
User avatar
cellers
 
Posts: 145
Joined: Fri Mar 26, 2010 5:32 pm
Location: Russian Federation

Re: Changing collisionset on collide

Postby canadian joe » Sun Mar 28, 2010 5:45 pm

sorry but i would have to say that it is better to use ":=" e.other.collideset :=(what you want the collideset to be) but when doing the collideset thing make sure not to write the collideset letter like A-B-C etc. Instead use there numbers, a=1 b=2 c=4 d=8 e=16 f=32 g=64 then add the ones you need. for example if i want it to change the collideset to be both a and b it would be a+b or 1+2 or "3"
canadian joe wrote:im just writing this so i can sig it


RicH wrote:Phun's Army.
User avatar
canadian joe
 
Posts: 115
Joined: Wed Feb 10, 2010 9:42 pm

Re: Changing collisionset on collide

Postby cellers » Sun Mar 28, 2010 5:57 pm

canadian joe wrote:sorry but i would have to say that it is better to use ":=" e.other.collideset :=(what you want the collideset to be) but when doing the collideset thing make sure not to write the collideset letter like A-B-C etc. Instead use there numbers, a=1 b=2 c=4 d=8 e=16 f=32 g=64 then add the ones you need. for example if i want it to change the collideset to be both a and b it would be a+b or 1+2 or "3"

it is easy if you know it :D
I long to write about it, but I thought that this topic has already been raised.
Russian Elite Forces :D
Now, in case of war, I can go to Airborne.

Image
User avatar
cellers
 
Posts: 145
Joined: Fri Mar 26, 2010 5:32 pm
Location: Russian Federation

Re: Changing collisionset on collide

Postby Chronos » Sun Mar 28, 2010 8:53 pm

canadian joe wrote:sorry but i would have to say that it is better to use ":="

It's not. You use := when creating a variable or spawning an object. You use = when changing a variable, which is what he's doing. Seriously, you two are wrong, so stop arguing with us about it.
TheWinkits wrote:They both looks of cuking amazing
User avatar
Chronos
[Most Active Member 2010]
 
Posts: 4457
Joined: Mon Aug 31, 2009 6:00 pm
Location: Californania

Re: Changing collisionset on collide

Postby Mr_Stabby » Tue Mar 30, 2010 2:51 pm

Image
while we're at it lets lets start calling all non-white ethnicities nignogs coz its easyer and makes no difference to me
Mr_Stabby
 
Posts: 155
Joined: Wed Dec 16, 2009 12:16 am

Re: Changing collisionset on collide

Postby Most_Likely » Tue Mar 30, 2010 3:07 pm

Was tat really necessary? :problem:
Image
User avatar
Most_Likely
 
Posts: 11
Joined: Tue Mar 30, 2010 11:55 am
Location: You don't need it.

Re: Changing collisionset on collide

Postby RicH » Tue Mar 30, 2010 3:09 pm

Most likely... :P
Millions of voices suddenly cried out in terror, and were suddenly silenced. Something terrible has happened.
User avatar
RicH
[Funniest Person 2010]
 
Posts: 2043
Joined: Tue Sep 01, 2009 9:01 am

Re: Changing collisionset on collide

Postby Chronos » Wed Mar 31, 2010 12:44 am

Man, that was rich. :lol:
TheWinkits wrote:They both looks of cuking amazing
User avatar
Chronos
[Most Active Member 2010]
 
Posts: 4457
Joined: Mon Aug 31, 2009 6:00 pm
Location: Californania

Re: Changing collisionset on collide

Postby canadian joe » Wed Mar 31, 2010 8:18 pm

well, i guess that settles it. just use = instead of :=
canadian joe wrote:im just writing this so i can sig it


RicH wrote:Phun's Army.
User avatar
canadian joe
 
Posts: 115
Joined: Wed Feb 10, 2010 9:42 pm

Re: Changing collisionset on collide

Postby RicH » Thu Apr 01, 2010 7:52 am

Not always.
Millions of voices suddenly cried out in terror, and were suddenly silenced. Something terrible has happened.
User avatar
RicH
[Funniest Person 2010]
 
Posts: 2043
Joined: Tue Sep 01, 2009 9:01 am

Re: Changing collisionset on collide

Postby Mystery » Thu Apr 01, 2010 7:59 am

Yes lets repeat this whole thread all over again.
Thyme is a language. SPEAK PROPER THYME!

= To change!
:= To create!
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Next

Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 5 guests