Page 1 of 1

using external script files

Posted: Tue Apr 13, 2010 9:43 pm
by zaroba
before i get too far into this immensely massive script project that i'm starting, i want to make sure i understand a few things about external scripts.

mainly, if i have an external script and its listed in the #include stuff,
could i have in it Event (“buildingTriggered”, “5”) and have it work when the building is triggered?
or would i have to have the event in the main script and use a 'CustomEvent( “external script” )' command to access the external script?

also, do the external scripts have to be .mts files as well? and do they need to be in a certain folder?

Posted: Thu Apr 22, 2010 10:41 am
by Mit
I should be able to answer these questions, but unfortunately i've forgotten how all that stuff works :)
It'll take a bit of research to find out, which i'll try to get round to soon - unless you beat me to it and use the alternative approach of 'try it, and if it works, it works :]'.

Posted: Thu Apr 22, 2010 10:54 am
by zaroba
i spent some time talking to wes and looking around on the forums here and found:.

mainly, if i have an external script and its listed in the #include stuff,
could i have in it Event (“buildingTriggered”, “5”) and have it work when the building is triggered?

yes, it should work

also, do the external scripts have to be .mts files as well? and do they need to be in a certain folder?
correct extension is .mit according to a version release topic of yours from last year and they can go in a 'scripts' folder.

although, it seems that having a single .mts file in the data folder works still too.



have yet to test any of the above though.