PDA

View Full Version : Increasing the radius of the whereami armband script?


SithRevan
02-28-2007, 12:09 AM
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

stoffe
02-28-2007, 07:59 AM
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.");
}

SithRevan
02-28-2007, 11:46 AM
Awesome! Thanks Stoffe.:D