Page MenuHomeFeedback Tracker

Add "m_bIsRelative" checkbox to SCR_WaypointPrefabLocation
Feedback, NormalPublic

Description

SCR_WaypointPrefabLocation should receive a checkbox that makes the waypoint location relative to the AI group.

Details

Severity
Tweak
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10
Category
General
Additional Information

This would be very useful for setting up automated waypoints, for example it could be used to make an AI group immediately defend the location it is spawned at, or follow a local patrol pattern.

Implementation is very simple and only takes a minute:

  • Add this attribute to SCR_WaypointPrefabLocation:
[Attribute("0", UIWidgets.CheckBox, "Is location relative")]
bool m_bIsRelative;
  • Add this instruction to SCR_AIGroup::AddWaypointsDynamic(), line 1370:
if (prefabs[i].m_bIsRelative) mat[3] = mat[3] + GetOrigin();

Optionally, you could rotate mat[3] by GetAngles() before adding GetOrigin().

Event Timeline

TilW created this task.Apr 30 2024, 2:18 AM
Geez changed the task status from New to Feedback.Apr 30 2024, 9:57 AM