General

Compare previous value with current

Started by hodok on .

Sign in or create an account to join the conversation.

7 posts

this is something I'm not very good at, but in principle it is not complicated.

- create an expression, call it 'last_x' or something like that
- create a script under the Multiball object that is executed by z and arrow up (0->1). Every time you touch the multiball the script will run
- in the script, add the line "last_x=x;"

This will write the current value of x (before you touched it) to the 'last_x' expression (memory). You may add a Monitor object to remain informed about the 'last_x' value. Now you can compare this value with the new current x value.

So the method is to use expressions as memory storage. With that you can do many nice things. Have a look at templates from other users, especially Antonio Blanca. But Blanca is just a good example, there are many other users that make good use of expressions.
Hmm now I dont understand.......What do you mean "single value"? WHAT IF, you touch two balls at the same time?

So WHAT IS EXACTLY that you want to be able to "monitor" - check for? Because obviously your first description:
"I need to identify which values of the array(x from MultiBall) have changed, how do I get "previous" value of x for comparing?" will not provide "one single value" if you are moving TWO (or more) balls at a time.