Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Activate script when enter a module

Page: 1 of 1
 Mindtwistah
06-21-2007, 4:12 PM
#1
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, 4:23 PM
#2
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, 5:01 PM
#3
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, 5:08 PM
#4
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, 5:21 PM
#5
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
Page: 1 of 1