Custom actions; show text to a specific player only - Printable Version +- Comrades in Arms Discussion Board (http://forum.ciahome.net) +-- Forum: Comrades in Arms Life (http://forum.ciahome.net/forumdisplay.php?fid=3) +--- Forum: Mission Making (http://forum.ciahome.net/forumdisplay.php?fid=8) +--- Thread: Custom actions; show text to a specific player only (/showthread.php?tid=3298) |
Custom actions; show text to a specific player only - Suchy - 02-11-2016 I have a problem with custom action. I've added an action to an object in a MP-compatible way: Code: addActionMP = Now inside the script called when the action is executed... 1. How cen I get the player that triggered this action? 2. How can I display a text, either via hint or cutText to this player only? Re: Custom actions; show text to a specific player only - Alwarren - 02-11-2016 _this select 1 in the action script is usually the unit that activated the action. The effect of the script is local, so it SHOULD be running on the unit's machine only to be sure, you can use something like Code: if (local (_this select 1)) then { Re: Custom actions; show text to a specific player only - Suchy - 02-11-2016 Thanks. So far I used "player" instead of _this select 1, not sure if correctly, but worked for me. When testing in SP. As for the hint to specific player I found some good info here https://forums.bistudio.com/topic/143835-hint-to-just-one-playervehicle/ and after slight modification got it working with: Code: rHINT = []; calling it from action script with Code: rHINT = [_this select 1, "local message"]; |