A little something

Discussion in 'Skript' started by PandaDevs, Apr 18, 2017.

Thread Status:
Not open for further replies.
  1. This just came into my mind.
    How necessary is it to include "stop [trigger]" at the end of code?
    I tend to avoid it all together UNLESS a part of code is unfinished.
     
  2. I don't think so unless you have a looping event, then it isn't necessary. For me it never is necessary. :p
     
    • Like Like x 2
  3. I used to have problems with infinite loops and laggy resources when I didn't use stop (when I just started Skripting) but for safety measure, I use stop for everything. I normally use it in unnecessary places, however, it is just a habit.
     
    • Agree Agree x 1
  4. Depending on the case you use.

    If you are inside a repetition or the code is repetitive and some trigger events arrive
    Stop trigger is required

    Now if the code that is is simple. (Boolean), you simply use a stop, to detect that the section is finished, remember to read from the bottom up
     
    • Like Like x 1
  5. heres an example:

    Code (Text):
    command /test:
        trigger:
            send "&9LOL!"
            stop trigger
     
  6. No its wrong
    Example

    With stop trigger


    Code (Text):
    on any move:
        if {PlayerMove.%player%} is true:
            stop trigger
    With stop
    Code (Text):
    command /test:
        trigger:
            send "&9LOL!"
            stop
     
  7. Wasn't seeking for an example, but okay.
    I'll most likely take @MarvelDC's advice and use stop on loops.
    Sweet!

    Thread locked.
     
Thread Status:
Not open for further replies.