I wanted to give some objects in our mod visual effects and set certain properties to them.
Therefore I made a script and placed it in -> module properties -> OnModuleLoad
effects and/or LocalInts are set like this:
object oThroneGwydion = GetObjectByTag("Throne_Gwydion");
SetLocalInt(oThroneGwydion, "NoKilling", 1);
These two lines stick a LocalInt to only one object that
has the tag "Throne_Gwydion"
so far so good but I have lots of objects that need such a LocalInt and I don't assume I have to give every object another single tag.
How do I have to change the lines if I want to set that LocalInt to every object
that has a certain tag? :blink: :blink:
[snapback]15212[/snapback]
As this only has to run onload, you can use a loop that scans for the tags on the area's you want. For example a execute script on the area's you want, with the loop in the scipt you execute. (you can re-use that script then instead of writing 1 for each area)
If you have much objects in your area's and/or much items with tags to do an effect on it, the script may be quite heavy. So make sure it only runs onload (no onbeat or something), otherwise you'll eat away free power on you machine you could use for something better.
-Mel