Jump to content
Sign in to follow this  
thesun

ProxyFlag on a vehicle

Recommended Posts

Hi guys, I am having a bit of a problem setting up a proxy flag on my vehicle that would animate like all the ones ingame do.

I took the flag_alone.p3d from sample models and resized it to actually match the pole on my vehicle and textured it with my own flag texture called cflag_co.paa.

Now my O2 setup loos like this:

flag1r.th.jpg

My config entry for the flag:

class cfgNonAiVehicles
{

class ProxyFlag;
	class ProxyACR_cflag: ProxyFlag	{model = "\acr_car\LRD\acr_cflag.p3d"; simulation = "flag"; scope = public;};
};

The file is present in the actual .pbo and everything and not only it doesn't animate, it even doesn't show ingame. Do i need some speciall entry in models.cfg or something?

Share this post


Link to post
Share on other sites

you dont need to make your own proxy at all.

You can use any of the standard flag proxies available on the CA content.

Then in the init (config init if you want them all to have flags) of your vehicle you write a little script which (and this is the only way I've ever had luck doing it, but you could try and skip the flag pole part)

creates a flagpole (can be at map origin 0,0,0)

sets the flag: _flagpole setFlagTexture "\path\to\your\cflag_co.paa"

sets the flag owner: _flagpole setFlagOwner driver vehicle

then you should have a nicely animated flag :)

Share this post


Link to post
Share on other sites

Thanks, i made my own because the one i wanted is much smaller than the originals are.

Share this post


Link to post
Share on other sites

in which case there are some specific named selections and properties you have to give to the model.

I'm not on my editing rig atm, so I dont know them off the top of my head, but I should be able to post the information later.

Share this post


Link to post
Share on other sites

Well it's the same model as the original ones are, just resized, so the selections and properties shoul be allright. But i'll patiently wait for any info you'll be able to provide.

Share this post


Link to post
Share on other sites

Assuming you have copied it exactly from the source models, then there are only 3 other things you need to do:

1. make sure you alter the xsize and ysize named properties to match the new dimensions of your flag (used to scale the "fluttering" animation)

2. rename it to flag_something (seems to be that the engine expects to find flag models prefixed with the word flag_)

3. in the model.cfg, have your new model inherit from flag:

class Flag: Default
{
sections[] = {"latka"};
};

You will still have to do the script part I mentioned above, having the proxy in the vehicle model just tells the engine where the flag should go when someone gets in the vehicle with a flag in their posession.

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  

×