Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: piere on January 25, 2014, 09:22:13 AM

Title: Attaching scripts from external sources
Post by: piere on January 25, 2014, 09:22:13 AM
Hello is it possible to attach scripts to actors from external sources? Right now when I do actor.AttachScript("C:\test.script"); it works fine in debug mode, but when the game is compiled, it does not work. Any idea why, or how to make it work after the game is compiled? Thanks
Title: Re: Attaching scripts from external sources
Post by: eborr on January 25, 2014, 10:11:43 AM
Is that not something to do with the script being referenced by an absolute address. Rg C:\something\ . Try putting it in the savegames location
Title: Re: Attaching scripts from external sources
Post by: Mnemonic on January 26, 2014, 12:39:22 PM
You would need to bundle the script compiler (dcscomp.dll) with the compiled game. It will only work on Windows.
Title: Re: Attaching scripts from external sources
Post by: Mnemonic on January 30, 2014, 09:45:55 PM
Oh I meant the DLL needs to be in the game directory.
Title: Re: Attaching scripts from external sources
Post by: Mnemonic on January 31, 2014, 07:44:04 AM
By default *.inc files are excluded from the compiled project, because normally they're not needed. See your project settings -> filters.
Title: Re: Attaching scripts from external sources
Post by: piere on January 31, 2014, 09:24:23 AM
Thanks Mnemonic it works ! Now are there any disadvantages or negative effects for including the .inc files?
Title: Re: Attaching scripts from external sources
Post by: Mnemonic on January 31, 2014, 06:45:12 PM
No, not really.