Aller au contenu

Photo

Creature Location Script Needed


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
Madasahatter

Madasahatter
  • Members
  • 111 messages

I have a boss that spawns in random places within my mod

 

I need a script that when used will find the creature using its tag or resref and  tell the pc it's location.

 

Thanks in advance



#2
The Amethyst Dragon

The Amethyst Dragon
  • Members
  • 1 878 messages
void main()

{

object oPC; // put in your own method of getting the PC object, based on how this

            // script will be called (conversation, item use, chatbar command, etc.

string sBossTag = "theboss"; // put in the boss critter's actual tag here

string sBossArea;



object oBoss = GetObjectByTag(sBossTag);

if (oBoss != OBJECT_INVALID)

   {

   sBossArea = "The Boss is located at/in " + GetName(GetArea(oBoss)) + ".";

   }

else

   {

   sBossArea = "The Boss is nowhere to be found.";

   }

SendMessageToPC(oPC, sBossArea);

}