Okay, I created a module and worte two scripts for it.
Is it possible to execute the other script inside the first one (which is linked to the module under properties) and if yes, how?
Execute another script?
Débuté par
Shard of Truth
, déc. 22 2009 02:02
#1
Posté 22 décembre 2009 - 02:02
#2
Posté 22 décembre 2009 - 02:46
It really depends on what you intend to do.
You can use the second script as an include in the first one, or use HandleEvent to outsorce the handling of certain events, or use DelayEvent to call the second script more or less independently.
You can use the second script as an include in the first one, or use HandleEvent to outsorce the handling of certain events, or use DelayEvent to call the second script more or less independently.
#3
Posté 22 décembre 2009 - 02:54
It would help if you could tell what the second script is for.
If it is to handle a particular event, you can just call HandleEvent (, R"") from inside that event block.
Edit: Need to refresh the page before replying
If it is to handle a particular event, you can just call HandleEvent (, R"") from inside that event block.
Edit: Need to refresh the page before replying
Modifié par TimelordDC, 22 décembre 2009 - 02:55 .
#4
Posté 22 décembre 2009 - 03:37
The reason I wrote two scripts is, that I reached the limit of number of includes in a single file. So the second script is more like a sequel of the first one.
So I just make something like this:
#include "script_2"
and then?
So I just make something like this:
#include "script_2"
and then?
#5
Posté 22 décembre 2009 - 06:22
There is a limit to the number of includes?
Anyway, still not sure what you're asking for.
"Script_2" can only be an include when it doesn't have a function named "main". So you need to rename it if there is one. After that, you call the included function in in the main function of your main script, just like would do with any other function.
Anyway, still not sure what you're asking for.
"Script_2" can only be an include when it doesn't have a function named "main". So you need to rename it if there is one. After that, you call the included function in in the main function of your main script, just like would do with any other function.
#6
Posté 22 décembre 2009 - 07:22
I guess the answer to the original question is no. What you are trying to do is not going to work the way you want it to. There should never be a need to split a script into two halves unless you are doing something very wrong.
#7
Posté 22 décembre 2009 - 07:22
Modifié par FalloutBoy, 22 décembre 2009 - 07:23 .
#8
Posté 22 décembre 2009 - 11:52
It seem you're right FalloutBoy, I can't trick the Toolset. If I include my second script in the first one, the include limit (which seems to be 182 by the way) is also reached.
Hmm, maybe I can find a completely different way to write this script.
Hmm, maybe I can find a completely different way to write this script.
Modifié par Shard of Truth, 22 décembre 2009 - 11:53 .
#9
Posté 23 décembre 2009 - 12:22
Why would you ever want to include 182 scripts? Maybe try merging some of those into one? Group them somehow, dunno. But 182 sounds insane. If DA single player module requires less, then... well - you shouldn't need more
Modifié par Gocek, 23 décembre 2009 - 12:24 .
#10
Posté 23 décembre 2009 - 01:50
Just to clarifiy this:
I wanted to include many plots from the single player campaign (mostly codex entries). It seemed to be the easiest way to create a working module.
I wanted to include many plots from the single player campaign (mostly codex entries). It seemed to be the easiest way to create a working module.





Retour en haut







