Jump to content

Home

OnSpawn scripting problem - TSL


Recommended Posts

First, let me say my intentions were to save time and make things easier. Not happening....To fill a module with npc's, I made a 'mother' npc. On her OnSpawn script parameter, I put the following script

 

void main() {

location lDestination = GetLocation(GetObjectByTag("522_mom"));



object oNew1 = CreateObject(OBJECT_TYPE_CREATURE, "522_fem2", lDestination);
object oNew2 = CreateObject(OBJECT_TYPE_CREATURE, "522_fem3", lDestination);
object oNew3 = CreateObject(OBJECT_TYPE_CREATURE, "522_man1", lDestination);
object oNew4 = CreateObject(OBJECT_TYPE_CREATURE, "522_man2", lDestination);
object oNew5 = CreateObject(OBJECT_TYPE_CREATURE, "522_man3", lDestination);
object oNew6 = CreateObject(OBJECT_TYPE_CREATURE, "522_fem1", lDestination);



}

 

Hoping this would create additional npcs in the area without me finding the coords and entering them in the rim. I've equipped the new spawned npcs with random walk feature so they 'take-off running" when spawned. The problem is, NONE of the npc's are spawning. Any help?

Link to comment
Share on other sites

I can't see anything either, but I've got an idea how to check... Besides that characters are spawned inside of other characters. I'd use a wait command between the lines to be sure... And if that doesn't work either, try to toggle it right in front of the spawn point just to see if something happens. If not, then go through every single line to see, if that line is working properly... for example you just take the first line, remove the other lines and put the function SendMessageToPC after it. so you know which line is making trouble...

 

Fastmaniac

Link to comment
Share on other sites

UUGH...:headbump....I did what you said, I debugged each line with the sendmessagetopc command and the script checked out. Nothing. I simplified it to one creature to spawn at a nearby waypoint, Nothing. Also tried using the ActionWait command. Nothing.

 

Could there be anything in the .git or .ifo file that would keep something from spawning? They look ok when compared to others..I don't know.

Link to comment
Share on other sites

Hold on a second.....I think I just realized what I did.....

 

I want to thank Fastmaniac, Ferc Kast, and TimBob for their help. I am an idiot. In the createobject command i was using the .utc tag instead of its template resref.

 

I nominate myself for the dumbest modding mistake. Someone start a thread for this.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...