Author Topic: get area tag?  (Read 319 times)

Legacy_Zeidae

  • Jr. Member
  • **
  • Posts: 72
  • Karma: +0/-0
get area tag?
« on: September 21, 2011, 06:03:51 am »


               Hi
I was wondering if there was a function for getting an area tag?
I have a script that I need to run only in a few areas on enter but need the area tag to be able and just use 1 script instead of 12+

Thanks '<img'>
               
               

               
            

Legacy_Terrorble

  • Sr. Member
  • ****
  • Posts: 370
  • Karma: +0/-0
get area tag?
« Reply #1 on: September 21, 2011, 06:40:23 am »


               If I'm not mistaken, you can use GetTag(OBJECT_SELF) from a script in the area's OnEnter handle to get its tag.  Or do you mean the script needs to run when you are entering the mod?
               
               

               
            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
get area tag?
« Reply #2 on: September 21, 2011, 07:18:26 am »


               Object oPC = GetEnteringObject();
object oArea = GetArea(oPC);
string sTag = GetTag(oArea);  //The TagName of the area the PC is entering

very simple..
               
               

               
            

Legacy_Zeidae

  • Jr. Member
  • **
  • Posts: 72
  • Karma: +0/-0
get area tag?
« Reply #3 on: September 21, 2011, 03:38:30 pm »


               Thanks guile. I thought it was simple. Just never had used it before.
               
               

               


                     Modifié par Zeidae, 21 septembre 2011 - 02:38 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
get area tag?
« Reply #4 on: September 21, 2011, 04:25:23 pm »


               If you are getting the tag from the area's OnEnter event All you need to use is:

string sAreaTag = GetTag(OBJECT_SELF);