Freezing an if statement

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

Freezing an if statement

Postby niffirg1 » Wed Sep 09, 2009 5:36 am

Ok so a custom variable lets say f is increasing at a linear rate. But when something collides with a certain object and it will stop this linear growth. Is there such a code that can stop a variables growth. Like if it is set to sim.time or something. If you could help me that would be great
User avatar
niffirg1
 
Posts: 376
Joined: Mon Aug 31, 2009 10:31 pm
Location: The Great American South!

Re: Freezing an if statement

Postby standardtoaster » Wed Sep 09, 2009 6:11 am

onCollide Object A: scene.my.a = {sim.time}

onCollide Object B: scene.my.a = sim.time

Object A sets it to a constant value of sim.time. Object B sets the current value of sim.time to it's value.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Freezing an if statement

Postby Sniperkasa » Mon Sep 14, 2009 8:40 pm

Exactly how do you want it to freeze.. and where is this going to be used, if you give me the code im quite sure i can figure it out
If you have a question, have a dollar and call somebody that cares.
No really just PM me if you have a problem :)
User avatar
Sniperkasa
 
Posts: 493
Joined: Tue Sep 01, 2009 5:34 pm
Location: The bottom of a lake.

Re: Freezing an if statement

Postby niffirg1 » Mon Sep 14, 2009 11:05 pm

Sorry i just noticed the topic said if statement it is supposed to be Custom Variable and i already figured it out
User avatar
niffirg1
 
Posts: 376
Joined: Mon Aug 31, 2009 10:31 pm
Location: The Great American South!

Re: Freezing an if statement

Postby Sniperkasa » Tue Sep 15, 2009 5:56 pm

Oh ok. Good it got solved then :D
If you have a question, have a dollar and call somebody that cares.
No really just PM me if you have a problem :)
User avatar
Sniperkasa
 
Posts: 493
Joined: Tue Sep 01, 2009 5:34 pm
Location: The bottom of a lake.


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 1 guest