Page 1 of 1

[Request] on_player_interact

Posted: Sun Dec 27, 2015 11:58 pm
by cookta2012
// LUA

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
	}
}