if statement problem

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

if statement problem

Postby koskok » Thu Jul 07, 2011 2:23 pm

Hi!
Ihave a problem with an if statement that I can't solve.Take a look:
Code: Select all
onCollide=(e)=>{e.other.entityID == 15342 ? {color = [0,0,0,1]} : {}}
koskok
 
Posts: 13
Joined: Thu Jul 07, 2011 12:46 pm

Re: if statement problem

Postby TC42 » Thu Jul 07, 2011 2:25 pm

You can't read entityID or geomID. While you can spawn objects with a certain entityID/geomID, I think they are both dynamic and subject to change. You can use controlleracc if you make it unique...?
Image
Spambot wrote:Nowadays, memes usually are studied less in the field of biology, but more with the arena of psychology along with sociology. But, the major area of a meme, getting embraced and imitated all the time is what’s at any core connected with any meme.
User avatar
TC42
 
Posts: 984
Joined: Sun Jan 09, 2011 1:53 pm
Location: $ sudo apt get-install sandwich_

Re: if statement problem

Postby koskok » Thu Jul 07, 2011 2:34 pm

TC42 wrote:You can't read entityID or geomID. While you can spawn objects with a certain entityID/geomID, I think they are both dynamic and subject to change. You can use controlleracc if you make it unique...?
Hmm...Ok I'll try it.
koskok
 
Posts: 13
Joined: Thu Jul 07, 2011 12:46 pm

Re: if statement problem

Postby Someone Else » Fri Jul 08, 2011 4:25 am

Yes, I would use controllerAcc, color, or textureMatrix.

TC42, you are completely right. Those variables are maybe not dynamic, but certainly protected from Thyme seeing or editing them (unless you use Grady's New Method...?) and auto-scramble themselves upon undo.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.

ARE YA HAPPY NOW?????

Thymechanic/Phundamentalist

Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
User avatar
Someone Else
 
Posts: 1147
Joined: Sun Nov 21, 2010 10:53 pm
Location: The Milky Way Galaxy

Re: if statement problem

Postby TC42 » Fri Jul 08, 2011 4:50 am

New method doesn't work above v1.6.0 or something like that, I think...
Image
Spambot wrote:Nowadays, memes usually are studied less in the field of biology, but more with the arena of psychology along with sociology. But, the major area of a meme, getting embraced and imitated all the time is what’s at any core connected with any meme.
User avatar
TC42
 
Posts: 984
Joined: Sun Jan 09, 2011 1:53 pm
Location: $ sudo apt get-install sandwich_


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 5 guests