View Single Post
  #11  
Old 03-28-2013, 11:29 PM
Zamthos
Discordant
 
Join Date: Jan 2013
Posts: 284
Default

A foreach to check a certain NPC type and use every entity ID from it? Not exactly what I meant.

This would pull all entity IDs for the one NPC and perform the action for all of them, not a singular Entity, I know this is possible, however I want to see how you can logistically work it out in the least problematic manner.
Code:
if($text=~/npc/i)
{
	my @npclist = $entity_list->GetNPCList();
	foreach $ent (@npclist)
	{
	    $ent->Shout("I'm a npc!");
	}
}
Reply With Quote