PDA

View Full Version : Activate script when enter a module


Mindtwistah
06-21-2007, 04:12 PM
How can I active a script when I enter a module without changing the .GIT file. Is there any script, like:

void main()
{
when enter module ("the module name")
Executescript ("Myscriptname")
}

tk102
06-21-2007, 04:23 PM
Actually you have the right idea, only backwards. Basically, you rename the old OnEnter .ncs file to something and compile your new custom script with the original OnEnter name. Then you call ExecuteScript on the old script at the end. This strategy for injecting a script into the OnEnter event is illustrated by Darth333 in post #3 of this thread (http://www.lucasforums.com/showthread.php?t=143536).

Mindtwistah
06-21-2007, 05:01 PM
Yes but if I replace the on enter script in Daviks estate the cutscene with Davik, Calo and Canderous will never launch. It would mess the game up.

tk102
06-21-2007, 05:08 PM
Your script would execute the original script. The original script, k_ptar_08aa_en.ncs, you will extract and rename to something like tar_08aa_en_old.ncs. Then you will name your script k_ptar_08aa_en and on the last line of your script before the closing brace, put the following:ExecuteScript("tar_08aa_en_old");

Mindtwistah
06-21-2007, 05:21 PM
aha, now I understand executescript to. Thanks tk.

EDIT: Ignore my next post that I've just deleted. It worked. You forgot to put in OBJECT_SELF tk