|
|
 |
10-13-2012, 07:07 PM
|
#1
|
|
Junior Member
Join Date: Oct 2011
Location: Winterhold, Skyrim
Posts: 479
Current Game: TES: Oblivion
|
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.
|
|
you may:
quote & reply,
|
10-13-2012, 08:36 PM
|
#2
|
|
Senior Member
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,564
|
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.
|
|
you may:
quote & reply,
|
10-13-2012, 08:44 PM
|
#3
|
|
Junior Member
Join Date: Oct 2011
Location: Winterhold, Skyrim
Posts: 479
Current Game: TES: Oblivion
|
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.
|
|
you may:
quote & reply,
|
10-13-2012, 09:03 PM
|
#4
|
|
Senior Member
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,564
|
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
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.
|
|
you may:
quote & reply,
|
10-14-2012, 08:42 AM
|
#5
|
|
Junior Member
Join Date: Oct 2011
Location: Winterhold, Skyrim
Posts: 479
Current Game: TES: Oblivion
|
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.
|
|
you may:
quote & reply,
|
10-15-2012, 02:31 AM
|
#6
|
|
Senior Member
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,564
|
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);
}
|
|
you may:
quote & reply,
|
10-15-2012, 03:04 PM
|
#7
|
|
Junior Member
Join Date: Oct 2011
Location: Winterhold, Skyrim
Posts: 479
Current Game: TES: Oblivion
|
Ok, thanks 
Formally MrObiWan
If you need help with textures on any KotOR/TSL mod, feel free to contact me.
|
|
you may:
quote & reply,
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Forum Jump
|
|
|
|
|
|