Whats wrong with this script?

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

Whats wrong with this script?

Postby ligglo » Mon Mar 22, 2010 6:13 am

(e)=>{scene.my.color = [1, 1, 1, 1] ? {scene.my.cutter = false} : {scene.my.cutter = true}}

I cant see whats wrong with it. It is supposed to be an if structure, and im not to good with those. My idea is to have a laser hitting a plane that has the script above, and if it hits the laser beam the beam becomes a cutter and cuts it, but it isnt becomming a cutter.
Thanks.
ligglo
 
Posts: 16
Joined: Thu Feb 11, 2010 5:00 am

Re: Whats wrong with this script?

Postby Mystery » Mon Mar 22, 2010 8:00 am

Code: Select all
(e)=>{{scene.my.color == [1, 1, 1, 1]} ? {scene.my.cutter = false} : {scene.my.cutter = true}}

fix'd
Last edited by Mystery on Mon Mar 22, 2010 10:50 am, edited 1 time in total.
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: Whats wrong with this script?

Postby Mr_Stabby » Mon Mar 22, 2010 8:03 am

another problem you might run into is that you cant actually cut a plane
Mr_Stabby
 
Posts: 155
Joined: Wed Dec 16, 2009 12:16 am

Re: Whats wrong with this script?

Postby ligglo » Mon Mar 22, 2010 10:48 am

Well im not cutting the plane in vutting omjects that go through the beam =]
ligglo
 
Posts: 16
Joined: Thu Feb 11, 2010 5:00 am


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 4 guests