PDA

View Full Version : Spawning problems


bryzz
05-24-2009, 01:10 PM
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

Star Admiral
05-24-2009, 01:22 PM
What scripts have you been trying to use? It's a bit difficult to help when we don't know what you have already tried.

- Star Admiral

bryzz
05-24-2009, 04:22 PM
//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);
}

Malxados
05-24-2009, 05:44 PM
Would you mind posting your versions of the scripts you tried?