Jump to content
wld427

Adding flags to vehicles

Recommended Posts

Can anyone help me with the code? I want to add this to my HQ vehicles. Is there some way to run this form the init line?

Share this post


Link to post
Share on other sites

You need flag proxy first on your HQ vehicle - for inspiration you can take a look at A2 samples (i.e. Zamak could be good starting point since A3 use almost same model as the one from Arma 2) since configuration of those flags is same as in previous bohemia titles. Most BI vehicles are using \A3\data_f\proxies\Flags\FLAG_auto (flag with stick) or \A3\data_f\proxies\Flags\FLAG_alone (lone flag). What is extremely important here is to place flag proxy in LAST RESOLUTION LOD - for some reason game calculates flag simulation from this proxy. After that you can use scripting command mentioned in topic you have quoted.

  • Like 4

Share this post


Link to post
Share on other sites

Thanks for the tip on placing the proxy in the last res LOD - don't think that would have been easy to find out!

 

What would be the best way of making a vehicle flag an option in the Eden VhC, rather than the player having to execute a script command?

 

Presumably the flag proxy can be given a named selection and placed into a hide AnimationSource. How would you set the texture on the flag in the config.cpp?

 

Edit: it seems to only animate in the res LOD's, and not pilot, cargo or gunner LOD's? Anyway around that?

Share this post


Link to post
Share on other sites
2 hours ago, UK_Apollo said:

Presumably the flag proxy can be given a named selection and placed into a hide

I don't think there'd be much point in adding an animation since the flag only appears when a flag owner or forced texture is assigned anyway

 

Potentially an Eden attribute can be used e.g.

class Attributes
{
	class tag_someAttributeClassname
	{
		control = "CheckboxNumber";
		defaultValue = "0";
		displayName="fly our flag";
		property = "tag_somePropertyName";
		expression = "if(_value isEqualTo 1)then{_this forceFlagTexture "path\To\Flag\Texture.paa"}";
	};
};

But I haven't tried that, and my scripting knowledge is minimal; so would be wise to check over the expression used. And set defaultValue to 1 if you want the flag to be show by default when the vehicle is placed, without mission makers checking in attributes

@wld427

  • Like 2

Share this post


Link to post
Share on other sites
43 minutes ago, da12thMonkey said:

I don't think there'd be much point in adding an animation since the flag only appears when a flag owner or forced texture is assigned anyway

 

Potentially an Eden attribute can be used e.g.


class Attributes
{
	class tag_someAttributeClassname
	{
		control = "CheckboxNumber";
		defaultValue = "0";
		displayName="fly our flag";
		property = "tag_somePropertyName";
		expression = "if(_value isEqualTo 1)then{_this forceFlagTexture "path\To\Flag\Texture.paa"}";
	};
};

But I haven't tried that, and my scripting knowledge is minimal; so would be wise to check over the expression used. And set defaultValue to 1 if you want the flag to be show by default when the vehicle is placed, without mission makers checking in attributes

@wld427

I like this solution the best. I just don't know about how to make it happen. i took such a long break form modding that i'm still playing catch up with a lot of these functions... plus i am not a very good scripter at all. That's why i threw the idea out here after i messaged you. 

 

Thank you for the input gents. 

Share this post


Link to post
Share on other sites

OK.... well i got it to work ... sort of....

 

4E8D79515095BD2C178F4E0AC5CD29F3BB22E1A8

 

So it appears now when the attribute box is checked.... unfortunately it refuses to animate or show my texture. 

 

The path to the texture is correct.....

 

am i missing a specific section required within the model sections?

 

class Attributes
		{
			class PRACS_flag_attribute
				{
				control = "CheckboxNumber";
				defaultValue = "0";
				displayName="Glorious Display of Patriotism";
				tooltip ="Glorious Display of Patriotism";
				property = "PRACS_flag_attribute";
				expression = "if(_value isEqualTo 1)then{_this forceFlagTexture '\PRACS_SLA_EXT\flag\flag_north_co.paa'}";
			};
		}; 
		

 

EDIT: FOUND THE PROBLEM

 

Mod conflict between current Dev branch proxies and current versions of either CUP Terrains or CUP core. 

 

above code works just fine with them disabled. 

  • Like 1

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

×