Page 1 of 1

Can I spawn hundreds of biter-spawner entity's around my base for fun?

Posted: Thu Mar 14, 2019 8:21 am
by XGhozt
I figured out this much:

Code: Select all

/c game.players[1].surface.create_entity{name = "biter-spawner", position = {410, -95}}
But I'm wondering if I can one-liner a command that would randomize the position to values within a specific range which runs 100 times.

Anyone know how to do that?

Re: Can I spawn hundreds of biter-spawner entity's around my base for fun?

Posted: Thu Mar 14, 2019 11:46 am
by DaveMcW

Code: Select all

/c for i = 1, 100 do game.player.surface.create_entity{name = "biter-spawner", position = {math.random(-999, 999), math.random(-999, 999)}} end

Re: Can I spawn hundreds of biter-spawner entity's around my base for fun?

Posted: Thu Mar 14, 2019 8:06 pm
by XGhozt
Yeesssss! Thank you :)