Can tag based scripting be used for non-inventory things, like doors and chairs?
Tag based scripting
Débuté par
Leurnid
, avril 24 2012 12:47
#1
Posté 24 avril 2012 - 12:47
#2
Posté 24 avril 2012 - 01:07
Yes. You can have a generic script, say onopened for doors, and have checks for specific tags within that script.
sDoorTag = GetTag(OBJECT_SELF);
if (sDoorTag == "door0001a")
{
DoSomethingHere();
}
else if (sDoorTag == "door0001b")
{
DoSomethingElseHere();
}
sDoorTag = GetTag(OBJECT_SELF);
if (sDoorTag == "door0001a")
{
DoSomethingHere();
}
else if (sDoorTag == "door0001b")
{
DoSomethingElseHere();
}
#3
Posté 24 avril 2012 - 02:06
The basic idea behind tag based scripting is that there is a built in activation script that the generic "use" item properties execute, and this is basically a framework that leads to the tag based script.
So if you wanted to have a tag based approach to other events on placeables etc... you'd need to set up a framework yourself, and then add the first script to every resource that you want to follow it. Because the ultimate result of a tag based script is to have a statement to the extent of:
ExecuteScript(STANDARD_PREFIX+GetTag(OBJECT_SELF));
So if you wanted to have a tag based approach to other events on placeables etc... you'd need to set up a framework yourself, and then add the first script to every resource that you want to follow it. Because the ultimate result of a tag based script is to have a statement to the extent of:
ExecuteScript(STANDARD_PREFIX+GetTag(OBJECT_SELF));





Retour en haut






