I was trying to make a script that will spawn a guard captain in the barracks in the daytime. It wasn’t working so I stripped it down to where it should spawn the captain when the PC enters the barracks regardless of time. Still doesn’t work! It’s such a simple script I can’t figure out why it isn’t working. I have double checked the tags of the captain and the spawn waypoint, they are correct. Any ideas?
int nObjectType = OBJECT_TYPE_CREATURE;
string sCaptain = “manuskess”;
location lTarget = GetLocation(GetWaypointByTag(“MANUS_DAY”));
int bUseAppearAnimation = FALSE;
int iTime = GetTimeHour();
int iIsPC = GetIsPC(GetEnteringObject());
PrintString(“Running manus day spawn”);
CreateObject(nObjectType, sCaptain, lTarget, bUseAppearAnimation);
I added the debug code to try to figure it out and it prints the string and time to the log so it’s running, it just doesn’t create the captain.