I have a minimal module that I use to test the occasional script. All it has is one room with a corridor leading off from it. In the room currently there is one waypoint in the middle of the room and a generic trigger across the doorway. The start point is in the corridor so that the PC enters and exits the trigger upon entering the room. There is a single tiny script attached to the OnEnter event of the trigger.
void main()
{
object oPC = GetEnteringObject();
if(!(GetIsPC(oPC)))
return;
location lHere = GetLocation(GetObjectByTag("NW_WAYPOINT001"));
object oClone = CreateObject(OBJECT_TYPE_CREATURE, "mohrg001", lHere);
}
What I want to know is why the Mohrg does not appear. I know that the location is valid because I used the exact same peice of code when I used this module before to produce a copy of the PC using the copy object function where the CreateObject function is now. I know that the resref is correct because it is copied and pasted straight from the blueprints. I have tried this with and without the
if(!(GetIsPC(oPC)))
without change. I am stumped.
I was carrying out this test because I have a large function that wasn't creating the monsters that it should. I figured that I would eliminate the low probability of cause script 1st.
In case anyone wants to look I have popped the little test mod into a 7z and posted it here in my dropbox/public folder.
Am I doing something wrong? Have I failed to include something essential? Thoughts anyone?
Thanks in advance.
TR





Retour en haut













