Add any player riding a rocket to the on_rocket_launch_ordered and on_rocket_launched events

Post Reply
User avatar
Muppet9010
Fast Inserter
Fast Inserter
Posts: 159
Joined: Sat Dec 09, 2017 6:01 pm
Contact:

Add any player riding a rocket to the on_rocket_launch_ordered and on_rocket_launched events

Post by Muppet9010 » Sat May 18, 2019 1:11 am

When the on_rocket_launch_ordered and on_rocket_launched events trigger could any player who is riding the rocket be included as an attribute.
The players are known within the game code to be passengers of the rocket.

Ideally the rocket entity get_passenger() and player entity vehicle() functions would also handle this state, but this looks to be far more work and isn't helpful in my use case.


The intended use is to script events for when the player is leaving and has left the planet via a rocket, i.e. teleport them to another surface.
Last edited by Muppet9010 on Thu May 23, 2019 10:16 pm, edited 1 time in total.

Bilka
Factorio Staff
Factorio Staff
Posts: 1954
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Add any player riding a rocket to the on_rocket_launch_ordered and on_rocket_launched events

Post by Bilka » Thu May 23, 2019 8:27 pm

Muppet9010 wrote:
Sat May 18, 2019 1:11 am
When the on_rocket_launch_ordered and on_rocket_launched events trigger could any player who is riding the rocket be included as an attribute.
The players are known within the game code to be passengers of the rocket.
Okay, added for the next version.
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”

Who is online

Users browsing this forum: No registered users