1 // Property of Alientrap
4 // uses .target to determine the target data item (or container)
6 void() Nex_Action_ResetData_Destroy =
8 String_EntityFree( self, target );
11 void() Nex_Action_ResetData_Action =
13 Raise_DataEvent( Menu_GetItem( self.target ), ITEM_DATA_RESET );
16 void() Nex_Action_ResetData =
18 String_EntityZone( self, target );
20 self.destroy = Nex_Action_ResetData_Destroy;
21 self.action = Nex_Action_ResetData_Action;
25 // link is the name of the datalink
27 // text is the description text
32 Nex_Automation_Option_Slider
35 // Embedded in a window with the following subitems: Description, Slider, Value
36 void() Nex_Automation_Option_Slider =
38 local entity lDescription, lSlider, lValue;
40 if( !self._parent.target ) {
41 objerror( "Bad target '", self._parent.target, "'" );
46 lDescription = Menu_GetItem( "Description" );
47 lSlider = Menu_GetItem( "Slider" );
48 lValue = Menu_GetItem( "Value" );
50 // Now set the properties
51 // (will be strzoned later by the Spawn functions)
52 lDescription.normal = self._parent.text;
53 lDescription.link = lSlider.name;
55 lSlider.target = self._parent.target;
57 lValue.target = self._parent.target;
58 lValue.link = lSlider.name;
63 Nex_Automation_Option_EditBox
66 // Embedded in a window with the following subitems: Description, EditBox
67 void() Nex_Automation_Option_EditBox =
69 local entity lDescription, lEditBox;
71 if( !self._parent.target ) {
72 objerror( "Bad target '", self._parent.target, "'" );
77 lDescription = Menu_GetItem( "Description" );
78 lEditBox = Menu_GetItem( "EditBox" );
80 // Now set the properties
81 // (will be strzoned later by the Spawn functions)
82 lDescription.normal = self._parent.text;
83 lDescription.link = lEditBox.name;
85 lEditBox.target = self._parent.target;
90 Nex_Automation_Option_Switch
93 // Embedded in a window with the following subitems: Description, Switch
94 void() Nex_Automation_Option_Switch =
96 local entity lDescription, lSwitch;
98 if( !self._parent.target ) {
99 objerror( "Bad target '", self._parent.target, "'" );
104 lDescription = Menu_GetItem( "Description" );
105 lSwitch = Menu_GetItem( "Switch" );
107 // Now set the properties
108 // (will be strzoned later by the Spawn functions)
109 lDescription.normal = self._parent.text;
110 lDescription.link = lSwitch.name;
112 lSwitch.target = self._parent.target;