[aps]gnat 28 Posted June 27, 2008 Hi all, Trying to ensure that the user of a UserAction is not for example in the vehicle. "this" is the vehicle, but I'm not aware of any way to refer to the "user" other than referencing "player" EG; Quote[/b] ] condition="this animationPhase ""cargodoor_down"" < 0.9 AND Alive(this) AND (getpos this select 2) > 20 AND !(Player in this)"; Its unsuitable for AI (seems so from testing), so how to I capture "user" instead of "player" ? Share this post Link to post Share on other sites
thegunnysgt 1 Posted June 27, 2008 Here is an example of a UserAction that only is avliable to a player inside the vehicle. Even if a player is currenlty in the vehicle any players outside won't be able to use it, because it is only avaliable to the person/people inside. Hope it helps, although I am not modder by any means what so ever. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgVehicles { class Air { class UserActions { class Display_Action { displayName = " ... "; OnlyForPlayer = true; position = "window"; default = false; radius = 10; condition = "player in this;"; statement = " ... "; }; }; }; }; And I don't think you can get around the fact that you have to reference the player as player. Share this post Link to post Share on other sites
General Barron 0 Posted June 27, 2008 Impossible, AFAIK. It is an extremely frustrating limitation of user actions. Scripted actions offer more flexibility though, you might want to add one of them in via the init event handler. Share this post Link to post Share on other sites
[aps]gnat 28 Posted June 27, 2008 Bugger !!! Thanks GB, gunny ..... maybe 3rd time lucky with ArmA2 eh Share this post Link to post Share on other sites
cervantes 330 Posted June 27, 2008 have you test in this select 0 ? Share this post Link to post Share on other sites