Stop then go on variable ?

Discussion in 'LEVEL EDITOR' started by Vavje, Jan 5, 2017.

  1. Vavje

    Vavje Clone Master Beta tester

    Hi,
    Need help to solve this :
    Mechanism is active (turning saw, laser enable, canons, for exemple). It stops suddenly. Then, I want it restarts and go on after X seconds.
    Wich variable is needed for doing this ?
    Thanks a lot !
     
  2. FBI Light Rock

    FBI Light Rock Techno Fury Moderator Beta tester

    Assuming you know what event triggers the stop and when, isn't it just a case of putting a delay event to X seconds after it stops?
     
  3. Vavje

    Vavje Clone Master Beta tester

    Of course. But put a start, then put a stop, then put a start again. I wondered if a variable could guide this cycle and attached whith only one toggle event ?

    Edit: I try tro understand variables I don't usually use. It becomes complicated.
     
    Last edited: Jan 5, 2017
  4. FBI Light Rock

    FBI Light Rock Techno Fury Moderator Beta tester

    Sure. Just use the IF event (A>B) and initialize (put in) a variable which has a value of zero. Then the first time it goes to True condition which is the toggle event and increases the variable by 1. Set a delay after it and forward it back to the IF event. Then when this happens, the variable is now 1 so when the IF condition is set to 0 or below, it can now go to the false condition which is nothing and thus terminates the system (program).
     
  5. Vavje

    Vavje Clone Master Beta tester

    Thanks a lot FBI !
     
  6. Vavje

    Vavje Clone Master Beta tester

    Ouch ! Me again, sorry.
    Complicated. I think I'm wrong with connections. Right after the (A>B), do these two variables needed ?
    (=1) (123) ?

    Edit : Succed. It works.

    [​IMG]
     
    Last edited: Jan 6, 2017
  7. FBI Light Rock

    FBI Light Rock Techno Fury Moderator Beta tester

    Great! Glad you had that figured out. And glad you found that using the On/Off (Also known as a boolean variable) variable is also neater. Now go make some contraptions and blow us away! :)
     
    Vavje likes this.

Share This Page