Attaches this light on the parent entity's memory point, with optional direction target memory point.
163 {
164 if (parent.MemoryPointExists(memory_point_start))
165 {
166 m_LocalPos = parent.GetMemoryPointPos(memory_point_start);
167 vector local_ori;
168
169 if (memory_point_target != "" )
170 {
171 if (parent.MemoryPointExists(memory_point_target))
172 {
173 vector target_pos = parent.GetSelectionPositionLS(memory_point_target);
176 }
177 else
178 {
179 ErrorEx(
"memory point 'memory_point_target' not found when attaching light");
180 }
181 }
184 }
185 else
186 {
187 ErrorEx(
"memory point 'memory_point_start' not found when attaching light");
188 }
189 }
void AttachOnObject(Object parent, vector local_pos="0 0 0", vector local_ori="0 0 0")
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.