lfnetwork.com mark read register faq members calendar

Thread: Force Cage Shut Down script
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 10-13-2012, 07:07 PM   #1
Scorge
Jedi Protector
 
Scorge's Avatar
 
Join Date: Oct 2011
Location: My Flagship.
Posts: 569
Current Game: SWTOR
Alderaan News Holopics contributor 
Force Cage Shut Down script

Hey guys, does anybody here know the script to shut down a force cage for TSL? Like when the player is inside one and someone shuts it down.

-Thanks


Formally MrObiWan

If you need help with textures on any KotOR/TSL mod, feel free to contact me.



Scorge is offline   you may: quote & reply,
Old 10-13-2012, 08:36 PM   #2
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,636
You need to do two things. First, you need to get the cage to play the shut down animation:
Code:
AssignCommand(oCage, ActionPlayAnimation(202, 1.0, 0.0));
Second, you need to destroy the invisible placeable that blocks you from entering or exiting the cage:
Code:
DestroyObject(oCageBlocker, 0.0, 0, 0.0, 0)
The tags vary, so you'll have to look them up.


JCarter426 is offline   you may: quote & reply,
Old 10-13-2012, 08:44 PM   #3
Scorge
Jedi Protector
 
Scorge's Avatar
 
Join Date: Oct 2011
Location: My Flagship.
Posts: 569
Current Game: SWTOR
Alderaan News Holopics contributor 
Thanks, but how do I put all that in one script? [Im sorry im horrible at scripting.]


Formally MrObiWan

If you need help with textures on any KotOR/TSL mod, feel free to contact me.



Scorge is offline   you may: quote & reply,
Old 10-13-2012, 09:03 PM   #4
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,636
No worries... this one is pretty simple. As I said you need to look up the tags, but I can type out everything else:
Code:
void main() {

	object oPrisoner = GetFirstPC();
	object oCage = GetNearestObjectByTag("tag", oPrisoner, 1);
	object oCageBlocker = GetNearestObjectByTag("tag", oPrisoner, 1);

AssignCommand(oCage, ActionPlayAnimation(202, 1.0, 0.0));
DestroyObject(oCageBlocker, 0.0, 0, 0.0, 0);

}
If the prisoner is someone other than the player, just replace
Code:
GetFirstPC();
with
Code:
GetObjectByTag("tag", 0);
Also note this doesn't play the cage shut off sound. But there is a universal script in the game for that; it would be easier to run that through the DLG file in addition to this, since everything is already set up.



Last edited by JCarter426; 10-13-2012 at 09:18 PM.
JCarter426 is offline   you may: quote & reply,
Old 10-14-2012, 08:42 AM   #5
Scorge
Jedi Protector
 
Scorge's Avatar
 
Join Date: Oct 2011
Location: My Flagship.
Posts: 569
Current Game: SWTOR
Alderaan News Holopics contributor 
Thanks. Do you add this line under the pc part
Code:
GetObjectByTag("tag", 0);
if your trying to release you and another npc?


Formally MrObiWan

If you need help with textures on any KotOR/TSL mod, feel free to contact me.



Scorge is offline   you may: quote & reply,
Old 10-15-2012, 02:31 AM   #6
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,636
Then you would need to do everything twice, using different variable names, like such:
Code:
void main() {

	object oPrisoner = GetFirstPC();
	object oPrisoner2 = GetObjectByTag("tag", 0);
	object oCage = GetNearestObjectByTag("tag", oPrisoner, 1);
	object oCageBlocker = GetNearestObjectByTag("tag", oPrisoner, 1);
	object oCage2 = GetNearestObjectByTag("tag", oPrisoner2, 1);
	object oCageBlocker2 = GetNearestObjectByTag("tag", oPrisoner2, 1);

AssignCommand(oCage, ActionPlayAnimation(202, 1.0, 0.0));
DestroyObject(oCageBlocker, 0.0, 0, 0.0, 0);
AssignCommand(oCage2, ActionPlayAnimation(202, 1.0, 0.0));
DestroyObject(oCageBlocker2, 0.0, 0, 0.0, 0);

}


JCarter426 is offline   you may: quote & reply,
Old 10-15-2012, 03:04 PM   #7
Scorge
Jedi Protector
 
Scorge's Avatar
 
Join Date: Oct 2011
Location: My Flagship.
Posts: 569
Current Game: SWTOR
Alderaan News Holopics contributor 
Ok, thanks


Formally MrObiWan

If you need help with textures on any KotOR/TSL mod, feel free to contact me.



Scorge 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 > Force Cage Shut Down script

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:39 PM.

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