Jump to content
Purzel

Change flag from Liberty

Recommended Posts

Is it somehow possible to change the given US-flag on the USS Liberty *ingame* to another homemade flag?
The texture "pirateflag.paa" in folder "pictures is present, but I need a working code to change the flag via trigger.

liberty setflagtexture "pictures\pirateflag.paa";

Does NOT work... any suggestions?

Share this post


Link to post
Share on other sites

Not tested for quite some time, at least didn't work back when the destroyer came out, maybe it got fixed meanwhile:

_destroyer = MyLiberty; 
_flag = "a3\data_f\flags\flag_csat_co.paa"; 
 
_flag = [_destroyer, "ShipFlag_US_F"] call bis_fnc_destroyer01GetShipPart;//retrieves the part holding the flag
_flag setObjectTextureGlobal [0,"a3\data_f\flags\flag_csat_co.paa"];//didn't work back when I tested it last time

Cheers

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Just tested my snippet above, doesn't work ingame, during mission runtime, as requested by @purzel.

Maybe there's a workaround, no idea for now.

 

Cheers

  • Thanks 1

Share this post


Link to post
Share on other sites
9 minutes ago, Grumpy Old Man said:

during mission runtime

Ahhh, either I missed that part, or he added it for clarity later.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
_destroyer = MyLiberty; 
_flag = [_destroyer, "ShipFlag_US_F"] call bis_fnc_destroyer01GetShipPart;
_flag setflagtexture "a3\data_f\flags\flag_csat_co.paa";

A8ilAq.jpg

 

Make sure to execute where the Liberty is local.

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites
30 minutes ago, Harzach said:

_destroyer = MyLiberty; 
_flag = [_destroyer, "ShipFlag_US_F"] call bis_fnc_destroyer01GetShipPart;
_flag setflagtexture "a3\data_f\flags\flag_csat_co.paa";

Make sure to execute where the Liberty is local.

 

Ah well, can't have enough texture-changing commands, I guess.

 

Cheers

  • Like 1
  • Thanks 1
  • Haha 3

Share this post


Link to post
Share on other sites

My solution via addAction:

 

I´ve attached a rope (Land_Rope_01_F) to the flagpole, so there´s a little "sparkling" eyecandy for players walking by...
in it´s init:

this addAction  ["<t color='#8FBC8F'>Change flag.</t>",{["scripts\flag.sqf","BIS_fnc_execVM",false,false] call BIS_fnc_MP}, nil,6,true,true,"","alive _target",3];

then in the flag.sqf:

_destroyer = liberty;  // "liberty" is the units name of my destroyer.
_flag = [_destroyer, "ShipFlag_US_F"] call bis_fnc_destroyer01GetShipPart;
_flag setflagtexture "pictures\jollyroger.paa";

That´s the working solution for multiplayer.

Share this post


Link to post
Share on other sites

If you want to remove the flag, including the pole, like i wanted, just put this on the ship init:

{deleteVehicle _x;} forEach (this nearObjects ["ShipFlag_US_F",200]);

 

  • Like 1
  • Thanks 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

×