Attaches this light on the parent entity's memory point, with optional direction target memory point.
166 {
167 if (parent.MemoryPointExists(memory_point_start))
168 {
169 m_LocalPos = parent.GetMemoryPointPos(memory_point_start);
170 vector local_ori;
171
172 if (memory_point_target != "" )
173 {
174 if (parent.MemoryPointExists(memory_point_target))
175 {
176 vector target_pos = parent.GetSelectionPositionLS(memory_point_target);
179 }
180 else
181 {
182 ErrorEx(
"memory point 'memory_point_target' not found when attaching light");
183 }
184 }
187 }
188 else
189 {
190 ErrorEx(
"memory point 'memory_point_start' not found when attaching light");
191 }
192 }
void AttachOnObject(Object parent, vector local_pos=vector.Zero, vector local_ori=vector.Zero)
Attaches this light on the parent entity, with optional position and orientation offset.
static vector Direction(vector p1, vector p2)
Returns direction vector from point p1 to point p2.
proto vector VectorToAngles()
Converts vector to spherical coordinates with radius = 1.