sarogahtyp 1105 Posted March 24, 2016 (edited) I d like to learn more about that command cause i ve to use it in near future i think. In another thread we stuck at the point where we d like to send one variable together with the command to the clients and tried to let the other variable get the Client itsself. this command should be executed on all clients: player reveal _desired_object; _desired_object should be sent from Server to all clients but player should be executed at the clients itsself to get the local player entity. EDIT: Could this be the solution?: _desired_object remoteExec ["player reveal", -2]; Edited May 31, 2016 by sarogahtyp Share this post Link to post Share on other sites
Arkensor 96 Posted March 24, 2016 https://community.bistudio.com/wiki/remoteExec Go down to the examples and have a look. There is everything you need. I dont know if you thing works, you need to test that, because you have got player reveal, not just a hint or setFuel or whatever. Normaly it is : "hello" remoteExec ["hint"]; -> Arma does that <function> <paramaters> -> which results in hint "hello" so what you try could function, however I would suggest to write a function for your reveal stuff and execute that - if your code does not work. Regards Arkensor Share this post Link to post Share on other sites
sarogahtyp 1105 Posted March 24, 2016 Go down to the examples and have a look... There is everything you Need... I crawled that examples before I opened that topic. It maybe that there is everything that u Need. but u cant say that for everyone. For me the examples r not detailed enough and I know that other guys struggled there, too. I also thought about to do that with a function but I didnt solved it upto now. It s a short Problem which Needs a short command. An example would be appreciated. 1 Share this post Link to post Share on other sites
haleks 8206 Posted March 24, 2016 There is everything you need to know on that wiki: Example for script command:// <params1> someScriptCommand <params2>;[<params1>, <params2>] remoteExec ["someScriptCommand", targets, JIP]; [player, _desired_object] remoteExec ["reveal", 0]; 1 Share this post Link to post Share on other sites
sarogahtyp 1105 Posted March 24, 2016 There is everything you need to know on that wiki: [player, _desired_object] remoteExec ["reveal", 0]; i dont thjnk that it works cause player is executed on server and returns null. null is sent to the client then and that is false. 1 Share this post Link to post Share on other sites
haleks 8206 Posted March 24, 2016 The above should work : it will run on every machine, except the server if it is a dedicated one (since it has no player). For Dedis, just change the targets to -2. Share this post Link to post Share on other sites
killzone_kid 1326 Posted March 24, 2016 i dont thjnk that it works cause player is executed on server and returns null. null is sent to the client then and that is false. see below 1 Share this post Link to post Share on other sites
killzone_kid 1326 Posted March 24, 2016 That is correct, remoteexec will execute given command with identical params on every client. Even if you execute it on client where player is not null, it will execute it for the same player on every client not for the player that own each client. you will need "call" [_desired_object, {player reveal _this}] remoteExec ["call", 0]; EDIT: server could be hosted, so 0 is fine for the target 3 Share this post Link to post Share on other sites
sarogahtyp 1105 Posted March 24, 2016 (edited) EDIT: written before KKs posts The above should work : it will run on every machine, except the server if it is a dedicated one (since it has no player).For Dedis, just change the targets to -2. sorry but i still think it cant.two possibilities:1. the content of both params is sent to clients. then player is null and _desired_object is its content and both is sent so.2. both names r sent as they r. which means player is the correct entity for player at clients. but then _desired_object is not known at client because its a local variable at the server.okay, 3rd possibility: i ,missunderstand that completly Edited March 24, 2016 by sarogahtyp Share this post Link to post Share on other sites
haleks 8206 Posted March 24, 2016 That is correct, remoteexec will execute given command with identical params on every client. Doh! Silly me... Thanks for the clarification KK! Share this post Link to post Share on other sites
sarogahtyp 1105 Posted March 24, 2016 That is correct, remoteexec will execute given command with identical params on every client. Even if you execute it on client where player is not null, it will execute it for the same player on every client not for the player that own each client. you will need "call" Thank u very much for that and for the solution. As I said, I m not the only guy who struggles with this. I appreciate all answers even if they were not correct. I love that you guys always try to help. :) Share this post Link to post Share on other sites
R3vo 2652 Posted March 24, 2016 I added a note to the remoteExec page with a quote from KK, I hope you don't mind. 2 Share this post Link to post Share on other sites