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.

Script/placing help

Page: 1 of 1
 TriggerGod
11-23-2008, 7:10 PM
#1
I haven't had one of these in a while :p

First off; the purpose: I have this saber I made the other night, and it is almost ready for release, except for this one issue; the box I spawned won't open.

Using Redhawke's Spawning Tut, (http://www.lucasforums.com/showthread.php?t=143536) I was able to spawn a metal box.

My old script:
void main()
{
object oLocker=CreateObject( OBJECT_TYPE_PLACEABLE, "lcker_saber", Location(Vector(-56.55119, 53.20418, -0.00007), 0.0));

CreateItemOnObject("item_resref", oLocker);
}
My box spawned correctly, but it was un-openable. So, I tried adding my item to the box's utp file, and removing the CreateItem line, so my new script is...
void main()
{
object oLocker=CreateObject( OBJECT_TYPE_PLACEABLE, "lcker_saber", Location(Vector(-56.55119, 53.20418, -0.00007), 0.0));

}

And it was still unopenable.

So, is there a solution for my problem, because I sure haven't found one.
 Star Admiral
11-23-2008, 8:57 PM
#2
I just had the same problem today while messing around with spawning crystal formations for lightsaber crystals. Make sure that in the box's .utp file that the "Usable" checkbox is checked. It's under the "Advanced" tab in KT.

- Star Admiral
 TriggerGod
11-23-2008, 9:50 PM
#3
thanks, that helped. I didn't really look in that tab because I only changed the resref.
 RedHawke
11-24-2008, 3:23 AM
#4
Make sure that in the box's .utp file that the "Usable" checkbox is checked. It's under the "Advanced" tab in KT.
Yup, the tutorial assumes you have extracted a utp file with an inventory already so that would be checked. ;)
 TriggerGod
12-07-2008, 3:01 PM
#5
Alright, thanks, both of you. Well, I'm almost done with my mod, and I have a problem. I changed one of my boxes' appearance to that of a locker, and put one of my sabers in there. I set up my script, and it works correctly. It spawns when I wanted it to spawn, and where I wanted it to spawn. But, my new problem is that the locker is empty, when I know I put one of the sabers in there. I even double checked the placeable's inventory, the saber is there, but not in the game. I even tried to make the locker back into a metal box (which I like more), but that didn't work (to my surprise...) I made sure I did everything right...
 Star Admiral
12-07-2008, 3:12 PM
#6
Are you spawning an item into the locker or is the item already inside the locker? Check the Template ResRefs, it could be the reason.

- Star Admiral
 TriggerGod
12-07-2008, 6:59 PM
#7
Are you spawning an item into the locker or is the item already inside the locker? The item is already in the locker. I can try to make it empty in the utp and have the item be created when the locker is spawned.
Check the Template ResRefs, it could be the reason.
No; thats not it.
 Star Admiral
12-07-2008, 7:15 PM
#8
The item is already in the locker. I can try to make it empty in the utp and have the item be created when the locker is spawned.

Try that.

Puzzles me. The only reason that I know of for the item not showing up in the locker is either the game can't locate the item or the wrong placeable is spawned. You checking the template resrefs rules out both options.

- Star Admiral
 TriggerGod
12-07-2008, 7:27 PM
#9
heh, turns out my problem had to do with the naming of the item in the Inventory Editor. I didn't even notice the problem until I looked at the editor before I took that item away, and I had named the item wrong.

Thanks for trying to help me, Star.
 Star Admiral
12-07-2008, 7:43 PM
#10
No problem, glad I could help. :)

- Star Admiral
Page: 1 of 1