How to controllall enemies

Place to get help with not working mods / modding interface.
mugi
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Mar 19, 2025 2:23 am
Contact:

How to controllall enemies

Post by mugi »

Hello.

In the Space Exploration MOD, when you use a plague-bomb, all enemies will attack you regardless of distance, does anyone know how to implement the same or a similar behavior?

Thank you very match.
Natha
Filter Inserter
Filter Inserter
Posts: 259
Joined: Sun Mar 15, 2015 1:48 pm
Contact:

Re: How to controllall enemies

Post by Natha »

Did you have a look into the SE code how it's done?
mugi
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Mar 19, 2025 2:23 am
Contact:

Re: How to controllall enemies

Post by mugi »

Thanks for comment. Yes I did, but I didn't understand.

Regarding how this could be achieved, we anticipated two cases:
(1)Increase enemy UnitPrototype.vision_distance as much as possible.
(2)Makes enemies perceive the damage over time from plague-bomb as an attack from the player.

However, in the case of (1), the maximum value of vision_distance could only be set to 100, and it could not be changed runtime.
Regarding (2), I was not sure what specific settings were required to make this possible.

If you know what I should check, could you let me know?
Thank you very much.
Post Reply

Return to “Modding help”