I was extremely happy to find the td.run() method today. I’m not sure how long it’s existed but it will definitely be cleaner that using always using DAT.run() to delay commands. Bonus!
Seems though it won’t take arguments as described by the wiki. This works:
script = \
'''
print('Hello')
print('This is a Delayed Script,')
print('executed by the td.run method')
print('Goodbye')
'''
run(script, delayFrames = 60)
but this returns td.error: Invalid or type of arguments :
[code]hello = ‘Hello’
goodbye = ‘Goodbye’
script =
‘’’
print(args[0])
print(‘This is a Delayed Script,’)
print(‘executed by the td.run method’)
print(args[1])
‘’’
run(script, hello, goodbye, delayFrames = 60)[/code]
maybe I have something wrong?
thanks
Keith