aliens

Author Topic: [DONE] Units ignored by the AI  (Read 1374 times)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
[DONE] Units ignored by the AI
« on: February 04, 2022, 03:12:01 pm »
Units (aliens and civilians) can now be marked as "ignoredByAI".

This will make AI ignore them.

Currently it has the following effects:
1. aliens will not attack ignored civilians
2. civilians will not attack ignored aliens :D
3. civilians will not react to ignored aliens
(4. aliens can't react to civilians in OXC either, so this was not necessary to implement)

Tip for modders: you can use this for example to better implement a hostage rescue mission... enemies will not attack the hostages (at least not directly)

Example:

Code: [Select]
units:
  - type: STR_HOSTAGE
    ignoredByAI: true        # default is false

PS: I tested the most common situations, but I can't guarantee that all situations are covered... should you notice that in some situations it's not working, report it

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: [DONE] Units ignored by the AI
« Reply #1 on: February 05, 2022, 07:05:09 am »
This is a feature I will definitely be putting to use.

I've been having to make a few non-combatant units be part of the alien faction so the AI wouldn't automatically gun them down, but then the player was getting the wrong feedback when they spotted the 'hostile' unit and was shooting them anyway.

Thank you for adding this!!!