Jump to content

Home

spawning problems


bryzz

Recommended Posts

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

Link to comment
Share on other sites

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([color="Yellow"]0.00,0.00,0.00[/color]), 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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...