View Single Post
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old July 18th, 2009, 02:37 PM
Quote:
Originally Posted by rob View Post
The problem is that the "AllowTrait" tags are *not* on the actor. They are only on the family. So we have to handle that next.
So how do we get the tags from the family to the actor? We need to write a script that copies them. Since we want all families to do this automatically, we'll add an Eval script to the Family component.

All we need to do is have each family that is selected copy its "AllowTrait" tags to the actor. This is achieved through a single line of script code. We want to do this early so that other mechanisms can base their logic on the presence of the tags. So we end up with the following Eval script.

<eval value="1" phase="Initialize" priority="4000"><![CDATA[
perform forward[AllowTrait.?]
]]></eval>

At this point, the visibility of the menus should now behave correctly, since the tags will now exist on the actor itself.
rob is offline   #47 Reply With Quote