Skip to content

Name Tags - Add variable to treat AI as players#10951

Merged
PabstMirror merged 3 commits intoacemod:masterfrom
DartRuffian:nametags/ai-as-player
Jun 15, 2025
Merged

Name Tags - Add variable to treat AI as players#10951
PabstMirror merged 3 commits intoacemod:masterfrom
DartRuffian:nametags/ai-as-player

Conversation

@DartRuffian
Copy link
Copy Markdown
Contributor

@DartRuffian DartRuffian commented Jun 8, 2025

When merged this pull request will:

  • Add GVAR(treatAsPlayer) variable to treat AI units as a player, including enemy AI.
    • Use case is for having AI be disguised to players. Experienced players would immediately know they're an enemy due to the name tag not showing
  • Moved common conditions to inline function

IMPORTANT

  • If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.

@DartRuffian
Copy link
Copy Markdown
Contributor Author

Not sure if this same logic should be applied here on L55:

if (_target != ACE_player &&
        {(side group _target) == (side group ACE_player)} &&
        {GVAR(showNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
        {lineIntersectsSurfaces [_camPosASL, eyePos _target, ACE_player, _target] isEqualTo []} &&
{!isObjectHidden _target}) then {

My use case was just for normal AI units, while this is for vehicle commanders

@PabstMirror PabstMirror added this to the 3.20.0 milestone Jun 10, 2025
@PabstMirror PabstMirror added the kind/enhancement Release Notes: **IMPROVED:** label Jun 10, 2025
@PabstMirror PabstMirror merged commit 413f998 into acemod:master Jun 15, 2025
3 checks passed
OverlordZorn pushed a commit to OverlordZorn/ACE3 that referenced this pull request Jun 16, 2025
* Add variable to treat AI as players

* Rename variable

* Add Pabst suggestion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement Release Notes: **IMPROVED:**

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants