Like this:sdgmlj wrote: ↑Mon Apr 11, 2022 12:17 amI don't quite understand how I can add itPi-C wrote: ↑Sun Apr 10, 2022 8:00 pmAlso, there's this at the top of scripts/respawn.lua:So you must addCode: Select all
--custon event --/c remote.call("space-exploration", "get_on_player_respawned_event") --script.on_event(remote.call("space-exploration", "get_on_player_respawned_event"), my_event_handler)
another function to your remote interfacea handler for SE's custom event. But thanks for finding this! This interferes with my mod as well, so now I know about it, I can fix it.
Code: Select all
if remote.interfaces["space-exploration"] and
remote.interfaces["space-exploration"]["get_on_player_respawned_event"] then
local event_id = remote.call("space-exploration", "get_on_player_respawned_event")
script.on_event(event_id, function(event)
game.print("SE has respawned a player!\nEvent data: "..serpent.block(event))
end)
end