Jump to content

Home

Spawning problems


bryzz

Recommended Posts

i have looked at RedHawk's Scripting tutorial 4 spawning items and i have latly be making new areas (reusing old modules) and when ever i try to get a placeable to spawn or an npc i cant get it to work

 

i dont know what it is im doing wrong and its buggin me 2 no end

Link to comment
Share on other sites

//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 = 0.00f; //Here is where you add the 'whereami' cheat coordinate 1.

MyVec.y = 0.00f; //Here is where you add the 'whereami' cheat coordinate 2.

MyVec.z = 0.00f; //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.

 

 

 

 

 

 

 

 

 

and also

 

 

 

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);

}

 

 

 

 

 

 

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

 

CreateItemOnObject("g_w_lghtsbr05", oLocker);

CreateItemOnObject("g_a_mstrrobe01", oLocker);

CreateItemOnObject("g_w_sbrcrstl04", oLocker, 2);

}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...