PDA

View Full Version : How do you write a background script that reacts to something?



dex
07-15-2018, 10:43 PM
Nevermind, I got it working.

lexbubba
07-16-2018, 01:31 AM
Could you share what you did? Also interested...

dex
07-16-2018, 04:38 AM
I just wanted a simple script to execute sloot whenever I exited berserk, so I got this:



def dostuff()
waitfor "The redness fades from the world and you begin to breathe harder."
if (!running? "sloot")
start_script "sloot"
end
end


loop{dostuff
pause 1}

Hornbreak
04-20-2020, 11:50 PM
Stealing this!