Page 1 of 1
Alien Attractor
Posted: Tue Sep 01, 2015 4:38 am
by TheSAguy
Is it possible to attract biters to a point?
Build something that will attract all biters in a radius to that point?
Or on a certain event have biters attack.
Thanks.
Re: Alien Attractor
Posted: Tue Sep 01, 2015 3:34 pm
by Adil
Re: Alien Attractor
Posted: Wed Sep 02, 2015 4:00 am
by TheSAguy
Thanks, I'll check it out.
Re: Alien Attractor
Posted: Fri Sep 11, 2015 9:23 pm
by TheSAguy
Okay, so this is working great in my mod:
Code: Select all
if event.created_entity.name == "rocket-silo" then
game.get_surface(1).set_multi_command({type=defines.command.attack,target=game.player.character,distraction=defines.distraction.none},2000)
but I do want to make a change. currently the command is to attack the player.
I'd like to have the biters attached the rocket-silo. I know this is possibly, by first getting the coordinates of the rocket-silo and then directing the alien to attack there.
Can someone maybe please help with that code?
Re: Alien Attractor
Posted: Fri Sep 11, 2015 9:48 pm
by prg
Did you try target=event.created_entity?
Re: Alien Attractor
Posted: Fri Sep 11, 2015 11:04 pm
by TheSAguy
Perfect!!
Thanks Prg!