Alien Attractor

Place to get help with not working mods / modding interface.
Post Reply
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1449
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Alien Attractor

Post 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.

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

Re: Alien Attractor

Post by Adil »

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.

TheSAguy
Smart Inserter
Smart Inserter
Posts: 1449
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Re: Alien Attractor

Post by TheSAguy »

Thanks, I'll check it out.

TheSAguy
Smart Inserter
Smart Inserter
Posts: 1449
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Re: Alien Attractor

Post 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?

User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Alien Attractor

Post by prg »

Did you try target=event.created_entity?
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!

TheSAguy
Smart Inserter
Smart Inserter
Posts: 1449
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Re: Alien Attractor

Post by TheSAguy »

Perfect!!
Thanks Prg!

Post Reply

Return to “Modding help”