Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Attaching scripts from external sources  (Read 2616 times)

0 Members and 1 Guest are viewing this topic.

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 301
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Attaching scripts from external sources
« 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
Logged

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 193
    • View Profile
Re: Attaching scripts from external sources
« Reply #1 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
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5679
    • View Profile
    • Dead:Code Site
Re: Attaching scripts from external sources
« Reply #2 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.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5679
    • View Profile
    • Dead:Code Site
Re: Attaching scripts from external sources
« Reply #3 on: January 30, 2014, 09:45:55 PM »

Oh I meant the DLL needs to be in the game directory.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5679
    • View Profile
    • Dead:Code Site
Re: Attaching scripts from external sources
« Reply #4 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.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 301
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Attaching scripts from external sources
« Reply #5 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?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5679
    • View Profile
    • Dead:Code Site
Re: Attaching scripts from external sources
« Reply #6 on: January 31, 2014, 06:45:12 PM »

No, not really.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.327 seconds with 24 queries.