script.on_event(defines.events.on_player_interact, function(event)
end
end)
// JSON like description of "event"
Code: Select all
event =
{
type =
{
"clicked_entity", // obviously they will have clicked an entity
"clicked_ground" // for this event to fire nothing will be "selected"
}
data =
{
// if the type is "clicked_entity" it will return the entity clicked.
// if the type is "clicked_ground" it will return an array or table with the x,y of the coordnate clicked
}
}