#Is it possible to stop a function outside of a function?

1 messages · Page 1 of 1 (latest)

icy sand
#

i wanna be able to stop a certain function but from another event is this possible?

zinc willow
#

You could

#

Check if a global var is set or something

#
  trigger:
    set {stop} to true

function something():
  while 1 = 1:
    wait 1 second
    broadcast “a”
    
    if {stop} is set:
      stop```only issue is you need to repeatedly check for the var
distant cove
#

Couldn't you jsut while {stop} is true:?