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.

spawning problems

Page: 1 of 1
 bryzz
08-13-2010, 4:37 PM
#1
i want to spawn a metal box in the first room on the endar spire on the other side of the room from the beds and i looked at the tut in the scripting section on how to do it but i cant get it to work - i have tried a few different thing but what i have now is

//note this code allows for re-entry as-is,
// you should only attach it to a dialog
// that you know will only fire once.
// To prevent re-entry in a more general sense, see tk102's notes in the next post
void main()
{
vector MyVec;
MyVec.x = 15.30399f; //Here is where you add the 'whereami' cheat coordinate 1.
MyVec.y = 27.74450f; //Here is where you add the 'whereami' cheat coordinate 2.
MyVec.z = -1.27500f; //Here is where you add the 'whereami' cheat coordinate 3 (elevation).
float r = 0.0f; // This is where you set the orientation of the placeable, set in degrees.

object oLocker = CreateObject( OBJECT_TYPE_PLACEABLE, "metalbox099", Location(MyVec, r));

CreateItemOnObject("g_w_lghtsbr05", oLocker);
CreateItemOnObject("g_a_mstrrobe01", oLocker);
CreateItemOnObject("g_w_sbrcrstl04", oLocker, 2);
}

which was from redhawk's part of the tut
i attached it to trasks dialogue and nothing came up
its the first time i am doing it so i have no clue
 newbiemodder
08-13-2010, 4:45 PM
#2
Assuming you copied the script right, which it looks like you did, did you put the actual placeable utc file in the override?

Also, double check your coordinates.

I find the second script easier for spawning placeablesL
void main()
{
object oLocker=CreateObject( OBJECT_TYPE_PLACEABLE, "footlker099", Location(Vector(0.00,0.00,0.00), 0.0));

CreateItemOnObject("g_w_lghtsbr05", oLocker);
CreateItemOnObject("g_a_mstrrobe01", oLocker);
CreateItemOnObject("g_w_sbrcrstl04", oLocker, 2);
}

Where the yellow values are your x, y, and z corrdinates following by your orientation in degrees.
 bryzz
08-13-2010, 4:58 PM
#3
yeah i double checked everything - then again after reading what you said - it still doesnt work

i just tried this the second script and got the same - nothing - so i dont know what it is i am doing wrong
 newbiemodder
08-13-2010, 5:07 PM
#4
So, you created a script, put it on a dialog script line( not conditional line) that is sure to be spoken. Then placed the new dialog file, the utc, and the ncs file in override. And nothing? strange
 bryzz
08-13-2010, 5:26 PM
#5
i attached it to the - "so grab you gear..." line which i checked and i am pretty sure that he says that specific line no matter what

ok - i cant get it to work - how do i go about doing this without scripting?? - or is scripting the only way
Page: 1 of 1