Aller au contenu

Photo

get area tag?


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
Zeidae

Zeidae
  • Members
  • 38 messages
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 :)

#2
Terrorble

Terrorble
  • Members
  • 194 messages
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?

#3
_Guile

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

very simple..

#4
Zeidae

Zeidae
  • Members
  • 38 messages
Thanks guile. I thought it was simple. Just never had used it before.

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


#5
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
If you are getting the tag from the area's OnEnter event All you need to use is:

string sAreaTag = GetTag(OBJECT_SELF);