Page 1 of 1

Freezing an if statement

PostPosted: Wed Sep 09, 2009 5:36 am
by niffirg1
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

Re: Freezing an if statement

PostPosted: Wed Sep 09, 2009 6:11 am
by standardtoaster
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.

Re: Freezing an if statement

PostPosted: Mon Sep 14, 2009 8:40 pm
by Sniperkasa
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

Re: Freezing an if statement

PostPosted: Mon Sep 14, 2009 11:05 pm
by niffirg1
Sorry i just noticed the topic said if statement it is supposed to be Custom Variable and i already figured it out

Re: Freezing an if statement

PostPosted: Tue Sep 15, 2009 5:56 pm
by Sniperkasa
Oh ok. Good it got solved then :D