Announcement

Collapse
No announcement yet.

A variable problem

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Vili
    replied
    Re: A variable problem

    Originally posted by Mark:
    Hi,

    Another method, using only one button is also possible. Simply have two Assign Value actions, one that sets the variable to 1 and the other that sets the variable to 0. Now the Assign Value action that sets the variable to 1 will have a Boolean condition that the variable does not equal 1 (or that it equals 0). And the Assign Value action that sets the variable to 0 will have a Boolean condition that the variable does not equal 0 (or that it equals 1).

    mark.

    [This message has been edited by Mark (edited 02-07-2002).]
    Sorry but this method is not working, or is working just once like this:
    If variable is first 0, on first click:
    (I) If var. is 1 set var. to 0; if var. is 0 set var. to 1; result - var. changed in 1 because is worked second part, when was changed from 0 to 1
    On second click variable is now 1:
    (II) If var. is 1 set var. to 0; if var. is 0 set var. to 1; result - var. is same 1, because is worked both parts when first was changed from 1 to 0 and second from 0 to 1.

    I remain to first method (hidden buttons).
    Thanks Mark for your help and time


    Leave a comment:


  • Lorne
    replied
    Re: A variable problem

    Hey yeah, that would work...cool workaround, Mark.

    Leave a comment:


  • Mark
    replied
    Re: A variable problem

    Hi,

    Another method, using only one button is also possible. Simply have two Assign Value actions, one that sets the variable to 1 and the other that sets the variable to 0. Now the Assign Value action that sets the variable to 1 will have a Boolean condition that the variable does not equal 1 (or that it equals 0). And the Assign Value action that sets the variable to 0 will have a Boolean condition that the variable does not equal 0 (or that it equals 1).

    mark.

    [This message has been edited by Mark (edited 02-07-2002).]

    Leave a comment:


  • Lorne
    replied
    Re: A variable problem

    One way to do that would be to use two different buttons, both in the same location and with the same look ("one on top of the
    other").

    One button sets the variable to "1", hides itself, and makes the other button visible.

    The other button sets the variable to "0", hides itself, and makes the other button visible.

    Leave a comment:


  • Vili
    started a topic A variable problem

    A variable problem

    Hello
    I want to make followings: when I push successive on a button I want to give value 0 and 1 alternately to a variable. Is it possible?

    Thanks for your time
Working...
X