View Full Version : Spawning NPC

06-29-2008, 11:18 AM
Hi! I have big trouble with spawning NPC. I cant do that using scripts :(

void main()
//do a whereami cheat to get the coordinates of the location
//where you want the npc to spawn
float x=89.97f;
float y=112.47f;
float z=0.00f;
//unless you want something specific, forget about orientation
float r=0.0f;
vector vecNPC=Vector(89.97,112.47,0.00);
location locNPC=Location(vecNPC, r);
//insert your npc tag instead of dan26_duncan. Don't remove the quotes.
object oNPC=CreateObject(OBJECT_TYPE_CREATURE,"g_bandon001",locNPC);
AssignCommand(GetObjectByTag("g_bandon001"), SetFacing(180.00));

But bandon doesn't exist :(

Can someone help me?

Master Zionosis
06-29-2008, 11:49 AM
I think the problem you have is on this line

object oNPC=CreateObject(OBJECT_TYPE_CREATURE,"g_bandon00 1",locNPC);

You have a space after the zeros, there shouldn't be a space there. Of course if theres a space in the file as well, you'll need to get rid of that as well.

06-29-2008, 07:23 PM