what function can i use to spawn and npc by tag?
Get a spawn by ResRef script, and substitute the ResRef part for Tag I assume?
what function can i use to spawn and npc by tag?
This is one of the easiest ways, the waypoint is added to the .git file as to where you want the npc to spawn.
void main() {
CreateObject(1, "npc .utc", GetLocation(GetObjectByTag("tag of waypoint", 0)), 0);
}
I guess you could always set the tag of the NPC to be the same as the ResRef, but otherwise you can't as there is no function defined in the game and probably due to different variants of the same NPC with the same Tag, or sometimes different NPC's all together.