Allow giving Asteroids a speed and vector

Hanakocz
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Sun Jun 24, 2018 7:06 pm
Contact:

Allow giving Asteroids a speed and vector

Post by Hanakocz »

Hello, currently we can spawn asteroids either manually in editor or by script, but they always have default speed and default vector (down). It would be nice to let us modify those values so we can spawn asteroids with specific vectors (so we can make the orbital "random" directions for example). Currently, I haven't found a method on their entity, that would affect them in this regard.
Bilka
Factorio Staff
Factorio Staff
Posts: 3602
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Allow giving Asteroids a speed and vector

Post by Bilka »

The create_entity function has a field for velocity for asteroid. I also added LuaEntity::get_movement() and set_movement() for 2.0.67.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Implemented mod requests”