Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Spawn by tag?

Page: 1 of 1
 Pikmin
08-08-2008, 6:40 PM
#1
what function can i use to spawn and npc by tag?
 Marius Fett
08-08-2008, 6:47 PM
#2
Get a spawn by ResRef script, and substitute the ResRef part for Tag I assume?
 DarthStoney
08-08-2008, 10:29 PM
#3
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);
}
 glovemaster
08-09-2008, 5:49 AM
#4
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.
Page: 1 of 1