This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Run a script from another script
#1
Hi,

In certain conditions I need to run a script from another script, I can trigger it by using:
Code:
script.disable('script2')
script.enable('script2')

But is there a simpler way, such as a script.run('scriptname')?
Thank you!
Morkov
Reply
#2
Use an event script with a virtual object or place a function into common functions and execute it directly.
Reply
#3
(07.09.2021, 06:06)admin Wrote: Use an event script with a virtual object or place a function into common functions and execute it directly.

In this case I prefer to keep using the disable/enable as it's simpler - the script I want to execute needs to be a resident script, so adding a virtual object and an event script just for this seems excessive, as is placing a function into the common functions.

Thank you
Thank you!
Morkov
Reply


Forum Jump: