Jump to content
Sign in to follow this  
MiG

usung addaction command

Recommended Posts

I'm adding addaction command not through the mission folder but directly from the addon using Eventhandlers command

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class EventHandlers

{

init = [_this select 0] exec {\fml_anbc\scripts\init.sqs};

};

there is a init script that is connected with several other scripts. When i use this code

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player AddAction ["Camara lenta","\fml_anbc\scripts\camlent.sqs"];

everything works fine ingame but if you are commanding a group of units the action menu has plenty of Camara lenta commands (the same number of the group members) I want this action command only performed by the player, so what should i add to the script so that happens?

Share this post


Link to post
Share on other sites

Try user actions if your doing it from a config. You can define the radius so only the individual can use it. Plus you can access it from the command menu to.

Something like this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class UserActions

{

class FOPlotTarget

{

displayName=$STR_DN_FOPlotTarget;

position="zbran";

radius=0.5;

condition="([This] Call FO_PlotTarget) and (This==Player) and ([Group This] Call FC_ValidGroup)";

statement="[This] Call FO_MapClick";

};

};

Share this post


Link to post
Share on other sites
Try user actions if your doing it from a config. You can define the radius so only the individual can use it. Plus you can access it from the command menu to.

Something like this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class UserActions

{

class FOPlotTarget

{

displayName=$STR_DN_FOPlotTarget;

position="zbran";

radius=0.5;

condition="([This] Call FO_PlotTarget) and (This==Player) and ([Group This] Call FC_ValidGroup)";

statement="[This] Call FO_MapClick";

};

};

Thanks, and you are right smile_o.gif It's the same thing and i can in fact reduce the radius function, that might solve my problem tounge_o.gif Thanks again for tip !!!

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  

×