Projectile's target - how to check?

Place to get help with not working mods / modding interface.
Post Reply
apriori
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Feb 18, 2016 8:13 pm
Contact:

Projectile's target - how to check?

Post by apriori »

How to check if spitter's or worm's projectile targets the player? I've found projectiles that are represented by entities. How to find out their target? And is it possible to change it or clear? Maybe entity.set_command is for this case?
Any code or mods posted by me are WTFPL, unless otherwise copyrights are specified.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Projectile's target - how to check?

Post by Adil »

set_command() is for use on units.
Target field can be specified on creation of projectile by script, but it's not accessible afterwards.
You've got to try something else.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

Post Reply

Return to “Modding help”