Jump to content
Sign in to follow this  
avibird 1

How to setup addaction menu for only two units. Help!

Recommended Posts

Need a little help with my syntax. I know how to setup an addaction menu for only one player use using an object init

this addAction["Recall Outpost Recruitment Squad Finch", "Avibird\fob2-Recall\doneHQ2Rinfsquad_Recall.sqf", nil, 6, True, True, "", "(_target distance _this) < 4 && _this == s1"]

I would like to add s2 to the list that could use this menu.

I have attempted

_this == s1; s2"]

_this == "s1"; "s2"]

_this == s1 == s2"]

I know it is a simple thing to get it to work.

---------- Post added at 00:37 ---------- Previous post was at 22:47 ----------

I attempted this

if ({player} count [s17, s18] < 1) then this addAction["Recall Outpost Recruitment Squad Finch", "Avibird\fob2-Recall\doneHQ2Rinfsquad_Recall.sqf", nil, 6, True, True, "", "(_target distance _this) < 4"]

Share this post


Link to post
Share on other sites

maybe an array check although I'm not clear on what your after exactly.

placed on the object

this addAction["Recall Outpost Recruitment Squad Finch", "Avibird\fob2-Recall\doneHQ2Rinfsquad_Recall.sqf", nil, 6, True, True, "", "(_target distance _this) < 4 && _this in [s1,s2]"]

OR

added to units in array

{_x addAction["Recall Outpost Recruitment Squad Finch", "Avibird\fob2-Recall\doneHQ2Rinfsquad_Recall.sqf", nil, 6, True, True, "", "(_target distance _this) < 4 "]} foreach [s1,s2]

Edited by F2k Sel

Share this post


Link to post
Share on other sites

You are the MAN F2k Sel Thank you once again for the help. I knew I was close with the code(: I would never guess to take out the == and add in You are really a big help. I hope you don't move on to ARMA3 just yet!

Share this post


Link to post
Share on other sites

@F2k Sel hey all works great with the code when placing it into an object at my main HQ (airport) but I wanted to put a second recall menu for my support units at my dynamic FOB's. I have a flagpole that spawns with my FOB's I use the flagpole to add an addaction to Decommission the Outpost (FOB) all works good any player can use it.

here is the code 1 = hq2df addaction ["Decommission Outpost", "Avibird\fob\delfob2.sqf"];

Now I attempted to use your codes above and add it to the flagpole like this

1 = hq2df addaction ["Decommission Outpost", "Avibird\fob\delfob2.sqf", nil, 6, True, True, "", "(_target distance _this) < 4 && _this in [s1,s2]"];

2 = hq2df addaction ["Recall Outpost Recruitment Squad Finch", "Avibird\fob2-Recall\doneHQ2Rinfsquad_Recall.sqf", nil, 6, True, True, "", "(_target distance _this) < 4 && _this in [s1,s2]"];

It will not show up on the flagpole but the code works fine with editor place objects. Very lost on the reason why.

Edited by AVIBIRD 1

Share this post


Link to post
Share on other sites

I'd suspect the name of the object may be an issue

to check the name add radio trigger and in on act put deletevehicle hq2df

If it work doesn't work then it must be how your spawning the objects.

Share this post


Link to post
Share on other sites

I will check that out. I think I have a small sleep between some of the base objects that spawn in when the commanders call for the base or outpost to be build! I will look at that Thank you brotherman!

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  

×