Jump to content

Home

Increasing the radius of the whereami armband script?


SithRevan

Recommended Posts

Hey everybody I was wondering if it would be possible to increase the radius of the whereami armbands location script so that it will tell you the tag of every character, door, placeable, sound, trigger, waypoint, and merchant in the area that you are in? If so could somebody give me some help with that so I could do it? Thanks guys.:D

Link to comment
Share on other sites

Hey everybody I was wondering if it would be possible to increase the radius of the whereami armbands location script so that it will tell you the tag of every character, door, placeable, sound, trigger, waypoint, and merchant in the area that you are in? If so could somebody give me some help with that so I could do it? Thanks guys.:D

 

Using a script like this should list the names (where applicable) and Tags of every such object in the area:

 

void Feedback(string sMessage) {
   SendMessageToPC(GetPartyLeader(), sMessage);
}

void main() {
   object oArea = GetArea(OBJECT_SELF);
   int iFilter = OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE 
               | OBJECT_TYPE_SOUND | OBJECT_TYPE_TRIGGER | OBJECT_TYPE_WAYPOINT | OBJECT_TYPE_STORE;

   Feedback("!!!! Listing objects in the area...");       
   object oObj = GetFirstObjectInArea(oArea, iFilter);
   while (GetIsObjectValid(oObj)) {
       string sMessage = "name = '" + GetName(oObj) + "'";
       sMessage += " [tag = '" + GetTag(oObj) + "']";
       sMessage += " - " + FloatToString(GetDistanceToObject(oObj), 4, 2) + "m away";
       Feedback(sMessage);

       oObj = GetNextObjectInArea(oArea, iFilter);
   }
   Feedback("!!!! Done listing objects in the area.");
}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...