Freezing Water

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

Freezing Water

Postby Torn » Fri Sep 11, 2009 5:08 am

Hi,

Does anyone know if it's possible to freeze water with an onCollide/onHitByLaser script?

Thanks,
Torn
Torn
 
Posts: 32
Joined: Tue Sep 01, 2009 8:06 am

Re: Freezing Water

Postby standardtoaster » Fri Sep 11, 2009 5:14 am

You can't. It just generates one polygon for the selected water amount.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Freezing Water

Postby Torn » Fri Sep 11, 2009 5:39 am

Ok, thanks. Another question - is it possible to make an object immune to scripting that would affect it?
Torn
 
Posts: 32
Joined: Tue Sep 01, 2009 8:06 am

Re: Freezing Water

Postby Chronos » Fri Sep 11, 2009 12:06 pm

Torn wrote:Ok, thanks. Another question - is it possible to make an object immune to scripting that would affect it?

you could always use if statements that check the color. thats what i do
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: Freezing Water

Postby Torn » Fri Sep 11, 2009 2:46 pm

Chronos wrote:
Torn wrote:Ok, thanks. Another question - is it possible to make an object immune to scripting that would affect it?

you could always use if statements that check the color. thats what i do


Could you please explain that in a bit more depth? I haven't learned how to use if statements yet. :P

Thanks
Torn
 
Posts: 32
Joined: Tue Sep 01, 2009 8:06 am

Re: Freezing Water

Postby standardtoaster » Fri Sep 11, 2009 3:58 pm

Have the object with the onCollide script and add e.other.color == [1,1,1,1] ? {} : {Your normal script}
Replace [1,1,1,1] with the exact color of the "immune" object.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Freezing Water

Postby Torn » Sat Sep 12, 2009 12:54 am

Awesome, thank you Chronos and standardtoaster! After a moment of confusion before I realised that to be used with a laser the script should use 'geom' instead of 'color', it worked!
Torn
 
Posts: 32
Joined: Tue Sep 01, 2009 8:06 am


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 1 guest

cron