Isaac Lemoal 0 Posted Thursday at 11:46 PM setAnimSpeedCoef which works in singleplayer doesnt work in multiplayer, here is the input i put in "[_this, 0.65] remoteExec ["setAnimSpeedCoef", 1];" if this is wrong feel free to correct me as i would very much like this script to work, thanks in advance. Share this post Link to post Share on other sites
pierremgi 4887 Posted Friday at 06:00 AM [_this, 0.65] remoteExec ["setAnimSpeedCoef", 0]; Share this post Link to post Share on other sites
Isaac Lemoal 0 Posted Friday at 05:44 PM 11 hours ago, pierremgi said: [_this, 0.65] remoteExec ["setAnimSpeedCoef", 0]; Thank you for replying. Unfortunetly it doesn't work, would there be anything else i need to add in order for the script to work ? Share this post Link to post Share on other sites
pierremgi 4887 Posted Friday at 05:46 PM 1 minute ago, Isaac Lemoal said: Thank you for replying. Unfortunetly it doesn't work, would there be anything else i need to add in order for the script to work ? Where your _this variable comes from? Share this post Link to post Share on other sites
Isaac Lemoal 0 Posted Friday at 06:23 PM 37 minutes ago, pierremgi said: Where your _this variable comes from? i used the script here https://community.bistudio.com/wiki/setAnimSpeedCoef and replaced "player" with "_this" Share this post Link to post Share on other sites
pierremgi 4887 Posted Friday at 06:26 PM _this is a magic variable. You can't use it if it doesn't refer to something (object like player or unit here) So, the question remains: what is _this? Share this post Link to post Share on other sites
Isaac Lemoal 0 Posted Friday at 07:08 PM 40 minutes ago, pierremgi said: _this is a magic variable. You can't use it if it doesn't refer to something (object like player or unit here) So, the question remains: what is _this? its in the init field of a playable unit Share this post Link to post Share on other sites
pierremgi 4887 Posted Friday at 07:29 PM In int field of any object (unit, playable unit, vehicle or else), 1 you don't have to remoteExec the code because it runs on every server + clients (at start) 2 the magic variable is this, not _this for these fields. so, this setAnimSpeedCoef 0.65; and that's OK. Share this post Link to post Share on other sites
Isaac Lemoal 0 Posted Friday at 09:42 PM 2 hours ago, pierremgi said: In int field of any object (unit, playable unit, vehicle or else), 1 you don't have to remoteExec the code because it runs on every server + clients (at start) 2 the magic variable is this, not _this for these fields. so, this setAnimSpeedCoef 0.65; and that's OK. It doesn't work, on single player it does and there is an actual difference of speed of animation but whenever i host the server locally or on a server it just doesn't work and i don't know why. Share this post Link to post Share on other sites
pierremgi 4887 Posted yesterday at 05:35 AM 7 hours ago, Isaac Lemoal said: It doesn't work, on single player it does and there is an actual difference of speed of animation but whenever i host the server locally or on a server it just doesn't work and i don't know why. Probably because locality changes when a player joins on a playable unit. Try: this setAnimSpeedCoef 0.65; this addEventHandler ["Local", { params ["_entity", "_isLocal"]; if (_isLocal) then {[_entity,0.65] remoteExec ["setAnimSpeedCoef",0]}; }]; No other idea. 1 Share this post Link to post Share on other sites