LuaRemote and multiplayer ?
Posted: Sun Apr 10, 2016 3:23 pm
Hi,
I wonder how I should write a remote/interface function to be consistent with multiplayer...
For example, if I want to write a function that launches the creation of a building by the player who is launching the remote command ?
I cannot use game.local_player to get some infos, because it is only accessible from console...
I cannot use game.player either, only accessible under solo game.
ex: the force of the object that is created must be the force of the player emitting the remote command.
I also need the position of the player to place the building close to the player.
And I wonder if a remote.call on one computer will be sent/replicate to other computer in the game ?...
I wonder how I should write a remote/interface function to be consistent with multiplayer...
For example, if I want to write a function that launches the creation of a building by the player who is launching the remote command ?
I cannot use game.local_player to get some infos, because it is only accessible from console...
I cannot use game.player either, only accessible under solo game.
ex: the force of the object that is created must be the force of the player emitting the remote command.
I also need the position of the player to place the building close to the player.
And I wonder if a remote.call on one computer will be sent/replicate to other computer in the game ?...