[solved] Homing projectiles problem
[solved] Homing projectiles problem
How to avoid projectiles from spitters and worms? If I teleport an entity away from enemy's attack range, their "bullets" still persecute entity. How to make them miss an entity?
Last edited by apriori on Thu Aug 25, 2016 9:15 am, edited 1 time in total.
-
- Filter Inserter
- Posts: 841
- Joined: Mon Sep 14, 2015 7:40 am
- Contact:
Re: Homing projectiles problem
Hmm... temporarily set the entity to destructible = false?
Re: Homing projectiles problem
Total assumption here but if projectiles are entities destroy the projectile entity if it gets too close to the target entity?
Re: Homing projectiles problem
Do you guys answer my question or you ask your own ones?
Each "answer" ends with question mark.

Re: Homing projectiles problem
both.. Maybe?apriori wrote:Do you guys answer my question or you ask your own ones?Each "answer" ends with question mark.

Re: Homing projectiles problem
There's a bulldozer mod which has a bulldozer blade which "eats" projectiles, might be useful.
Re: Homing projectiles problem
BlakeMW wrote:There's a bulldozer mod which has a bulldozer blade which "eats" projectiles, might be useful.
Yes, it's entities.Nexela wrote:Total assumption here but if projectiles are entities destroy the projectile entity if it gets too close to the target entity?
Code: Select all
blockprojectiles = function(self,pos, area)
for _, entity in ipairs(game.surfaces[1].find_entities_filtered{area = area, name="acid-projectile-purple"}) do
entity.destroy()
end
end