Jump to content
Sign in to follow this  
[aps]gnat

UserAction - Condition - identifying the user

Recommended Posts

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

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

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

Bugger !!! sad_o.gifbanghead.gif

Thanks GB, gunny ..... maybe 3rd time lucky with ArmA2 eh

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×