lfnetwork.com mark read register faq members calendar

Thread: Activate script when enter a module
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 06-21-2007, 04:12 PM   #1
Mindtwistah
Junior Member
 
Mindtwistah's Avatar
 
Join Date: Apr 2007
Location: Derka Derka
Posts: 470
Activate script when enter a module

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")
}


Mindtwistah is offline   you may: quote & reply,
Old 06-21-2007, 04:23 PM   #2
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,765
Current Game: Watch_Dogs
Forum Veteran Helpful! Notable contributor 
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.
tk102 is offline   you may: quote & reply,
Old 06-21-2007, 05:01 PM   #3
Mindtwistah
Junior Member
 
Mindtwistah's Avatar
 
Join Date: Apr 2007
Location: Derka Derka
Posts: 470
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.


Mindtwistah is offline   you may: quote & reply,
Old 06-21-2007, 05:08 PM   #4
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,765
Current Game: Watch_Dogs
Forum Veteran Helpful! Notable contributor 
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:
Code:
ExecuteScript("tar_08aa_en_old");
tk102 is offline   you may: quote & reply,
Old 06-21-2007, 05:21 PM   #5
Mindtwistah
Junior Member
 
Mindtwistah's Avatar
 
Join Date: Apr 2007
Location: Derka Derka
Posts: 470
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



Last edited by Mindtwistah; 06-27-2007 at 03:17 PM.
Mindtwistah is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > Activate script when enter a module

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:59 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.