using external script files

Forum Archive - from http://theuniversal.net
Locked
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

using external script files

Post 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?
User avatar
Mit
Staff
Staff
Posts: 3551
Joined: Sun Sep 21, 2003 10:14 pm
Location: Unknown

Post 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 :]'.
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Post 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.
Locked