ok, figured as much. Hm, you could probably just name a selection and have the position as that, right?
Then I can name a part of the gun "tehuberl33tpos" and just have position set as that ;D
And as for radius, it'll be smaaaaall. Because I also hate the fact that you can fire other people's goggles with the BAS units.
editI'd be happy if it weren't for the fact that it's not working
class UserActions
{
class switchScope
{
displayName="Switch optics";
position="zbran";
radius=1;
condition="player hasWeapon ""KTE_M4Bi_AC""";
statement="[this] exec ""switchBiScope.sqs""";
};
};
That's what I have now, KTE_M4Bi_AC is a valid weapon, and this action is supposed to be attached to it, problem: Nothing shows up in the action menu. I've tried with replacing the double quotes with { and }, I've tried setting condition to nothing (empty) and true. Could it be my "position" that's farking things up?
Or maybe the radius is too small?
edit2Right, found out that OFP doesn't like you adding actions to weapons, so I had to do a unit-addon as well.
Anyway, now I've got another problem.
Everything works 100%, except when I select one of the weapons, I get two actions. I've checked through the config.cpp, and there's only one entry for this, so I'm wondering what could cause it.