SithRevan Posted July 20, 2006 Share Posted July 20, 2006 I was just wondering if somebody could help me with making a container in the jedi enclave on dantooine near jorran, I have been trying for a week to do it so I decided to get some help. -SithRevan Link to comment Share on other sites More sharing options...
stoffe Posted July 20, 2006 Share Posted July 20, 2006 I was just wondering if somebody could help me with making a container in the jedi enclave on dantooine near jorran, I have been trying for a week to do it so I decided to get some help. You could do this by altering the script that makes Jorran open the door and come out of the room he's holed up in. The script is a_jorr_cs, and, if altered like below it should spawn a container from the template jorranbox.utp near where he stands inside the room. You'll need to create a container placeable named like above, make sure it has the Tag field set to "jorranbox" as well, and save it in the override folder along with the script. void main() { // ST: ADDED - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Spawn the box near where Jorran stands. if (!GetIsObjectValid(GetObjectByTag("jorranbox"))) { location lLoc = GetLocation(GetObjectByTag("npc_jorran")); vector vPos = GetPositionFromLocation(lLoc); vPos.x += 1.5; vPos.y += 1.5; lLoc = Location(vPos, GetFacingFromLocation(lLoc)); CreateObject(OBJECT_TYPE_PLACEABLE, "jorranbox", lLoc); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // ST: Open the door... object oDoor = GetObjectByTag("jorr_door"); SetLocked(oDoor, FALSE); DelayCommand(0.5, AssignCommand(oDoor, ActionOpenDoor(oDoor))); // ST: Put the player in position... AssignCommand(GetFirstPC(), ActionJumpToObject(GetObjectByTag("wp_jorr_pc"), TRUE)); // ST: Move Jorran out of the room. DelayCommand(1.0, AssignCommand(GetObjectByTag("npc_jorran"), ActionMoveToObject(GetObjectByTag("wp_jorr_1"), TRUE))); } I've attached a compiled version of the above script in case you have trouble compiling scripts. a_jorr_cs.zip Link to comment Share on other sites More sharing options...
SithRevan Posted July 21, 2006 Author Share Posted July 21, 2006 Thank you so much I have been trying to figure that one out for a week. Link to comment Share on other sites More sharing options...
SithRevan Posted July 21, 2006 Author Share Posted July 21, 2006 Just one more thing I was kinda wondering where to put the coordinates in this script, I am not sure just how to go about it. Link to comment Share on other sites More sharing options...
Darth333 Posted July 21, 2006 Share Posted July 21, 2006 Stoffe already took care of that for you with this: location lLoc = GetLocation(GetObjectByTag("npc_jorran")); vector vPos = GetPositionFromLocation(lLoc); vPos.x += 1.5; vPos.y += 1.5; It will place the container near Jorran (1.5 m from his position) so unless you want something specific, you don't have to do anything. If you absolutely want specific coordinates, then replace the following lines of the script: if (!GetIsObjectValid(GetObjectByTag("jorranbox"))) { location lLoc = GetLocation(GetObjectByTag("npc_jorran")); vector vPos = GetPositionFromLocation(lLoc); vPos.x += 1.5; vPos.y += 1.5; lLoc = Location(vPos, GetFacingFromLocation(lLoc)); CreateObject(OBJECT_TYPE_PLACEABLE, "jorranbox", lLoc); } With: if (!GetIsObjectValid(GetObjectByTag("jorranbox"))) { CreateObject(OBJECT_TYPE_PLACEABLE, "jorranbox", Location(Vector(0.00,0.00,0.00), 0.0)); } Just replace the (0.00,0.00,0.00), 0.0 by your xyz coordinates and the orientation. The first 0.00 =x, the second = y, the third = z and the last 0.00 after the parenthesis is the orientation. You'll also find a few extra options here: http://www.lucasforums.com/showthread.php?t=143536 Link to comment Share on other sites More sharing options...
SithRevan Posted July 21, 2006 Author Share Posted July 21, 2006 Thank you very much I was really confused with that one, so thanks a lot. Link to comment Share on other sites More sharing options...
SithRevan Posted July 21, 2006 Author Share Posted July 21, 2006 hey, also I was wondering how to put items in this container if someboy could help me with that I would be very thankful, Thanks. Link to comment Share on other sites More sharing options...
ChAiNz.2da Posted July 21, 2006 Share Posted July 21, 2006 hey, also I was wondering how to put items in this container if someboy could help me with that I would be very thankful, Thanks. Since you're going to need to create a custom .utp file (the "jorranbox.utp" container).. just add what you want in it by using the "Inventory" function (assuming you're using KotOR Tool) When you open the function there will be a "split" screen... To the left is a list of game items.. to the right will be the box's inventory. Just drag-n-drop items from the left over to the right If you want to place 'custom' modded items... drag anything over from the left side of the screen over to the right, then re-name the ResRef field of the dragged item to your new item's ResRef tag... Be sure after all is saved, said & done.. you remember to also place your custom/modded items (.uti) in your override folder... and of course, your jorranbox.utp Link to comment Share on other sites More sharing options...
SithRevan Posted July 21, 2006 Author Share Posted July 21, 2006 Thanks I was thinking that that would probly work but I wanted to get a professional opinion first, so thanks -SithRevan Link to comment Share on other sites More sharing options...
SithRevan Posted July 21, 2006 Author Share Posted July 21, 2006 Hey one more thing I was wondering how to put like bones by the container would I have to write a new script for it or could I put something else in the script to make it spawn another placeable, and if I can do that what would the script look like. Link to comment Share on other sites More sharing options...
Darth333 Posted July 21, 2006 Share Posted July 21, 2006 Just add the number of lines you need to the above code. Example: if (!GetIsObjectValid(GetObjectByTag("jorranbox"))) { CreateObject(OBJECT_TYPE_PLACEABLE, "jorranbox", Location(Vector(0.00,0.00,0.00), 0.0)); } if (!GetIsObjectValid(GetObjectByTag("newplaceable2"))) { CreateObject(OBJECT_TYPE_PLACEABLE, "newplaceable2", Location(Vector(0.00,0.00,0.00), 0.0)); } replace newplaceable2 by the tag (1st line) and resref (second line) of your placeable. Make sure it does not exceed 16 characters. Link to comment Share on other sites More sharing options...
SithRevan Posted July 21, 2006 Author Share Posted July 21, 2006 Thank you so much I really needed that! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.