M6mal

changing flag design and adding to server

14 posts in this topic

I have a few flags at my altis terminal flying. I want to know how to add a different flag desigb to the server. I have my flag.paa design but i want to know what todo to change my flags to this new design. NOT TO BE CONFUSED WITH A BASE FLAG. My flags are just for decoration. I found out how to change the exile billboards to my design, but cant find any info about flags added to the  terminal etc

Share this post


Link to post
Share on other sites

Hey @M6mal

https://community.bistudio.com/wiki/forceFlagTexture

Im guessing something like this:
 

Spoiler

//trader1 ELECKTRO//
_pos = [6984.43,8291.26,4.765];
_object = createVehicle ["Exile_Item_Flag ", _pos, [], 0, "CAN_COLLIDE"];
_object setDir 41.525;
_object setPosATL _pos;
_object  forceFlagTexture [0,"textures\logo.paa"];
_object allowDamage false;

 

Edited by aussie battler

Share this post


Link to post
Share on other sites
Advertisement

i added

 

//trader1 ELECKTRO//
_pos = [14735.4,16565.1,17.91];
_object = createVehicle ["Exile_Item_Flag ", _pos, [], 0, "CAN_COLLIDE"];
_object setDir 41.525;
_object setPosATL _pos;
_object  forceFlagTexture [0,"textures\logo.paa"];
_object allowDamage false;

to the end of my initserver.sqf and it did not work, i added my flag coords of a known flag position and pasted it in and added the text exactly as seen from my example. did i need to add anything else such as ) or something

Share this post


Link to post
Share on other sites

Sorry I should have explained it better, code this is the same as custom billboards.

initplayerlocal.sqf

Spoiler

[] ExecVM "custom\flags.sqf";

 

yourmission.Exile\custom\flags.sqf

Spoiler

/*
    File: billboards.sqf
    Author: Trill
    Contact:
    
    Description: Custom Buildings
*/

diag_log format['Custom %1 - Starting billboards.sqf',time];


_pos = [6984.43,8291.26,4.765];
_object = createVehicle ["Exile_Item_Flag ", _pos, [], 0, "CAN_COLLIDE"];
_object setDir 41.525;
_object setPosATL _pos;
_object  forceFlagTexture [0,"textures\logo.paa"];   //your flag logo here
_object allowDamage false;


Make sure:

+ You have flags.sqf in the folder"custom".
+ You have your logo as a .paa file in the correct dirctory , the example is set to textures\logo.paa

  • Like 1

Share this post


Link to post
Share on other sites

made a folder called custom and put the flags.sqf in it

made a folder called textures and put my logo.paa in it

added [] ExecVM "custom\flags.sqf";  to initplayerlocal.sqf

altered the coord of flag to suit mine where i want it ( i have a uk flag and used its coord and deleted the flag from my initserver.sqf as i have all my uk flags there)

 

it didn't work

the logo.paa is ok aswell as i have used it to make a custom base flag but the devs have included one for me in the latest release so now i can use it when i get it working for my traders flags outside terminal

 

Share this post


Link to post
Share on other sites

@M6mal try this code: setFlagTexture

yourmission.Exile\custom\flags.sqf

 

Spoiler

/*
    File: billboards.sqf
    Author: Trill
    Contact:
    
    Description: Custom Buildings
*/

diag_log format['Custom %1 - Starting billboards.sqf',time];


_pos = [6984.43,8291.26,4.765];
_object = createVehicle ["Exile_Item_Flag", _pos, [], 0, "CAN_COLLIDE"];
_object setDir 41.525;
_object setPosATL _pos;
_object  setFlagTexture "textures\logo.paa";   //your flag logo here
_object allowDamage false;

https://community.bistudio.com/wiki/setFlagTexture
Bohemia example:
 

Spoiler

private _flag = "FlagPole_F" createVehicle position player;
_flag setFlagTexture "\A3\Data_F\Flags\Flag_CSAT_CO.paa";
_flag setFlagSide east;

 

Edited by aussie battler

Share this post


Link to post
Share on other sites

I got it working:

_pos = [11789.5,4712.8,0];
_this = createVehicle ["FlagPole_F", _pos, [], 0, "CAN_COLLIDE"];
_this setPos _pos;
_this forceFlagTexture "textures\logo.paa";   //your flag logo here
_this allowDamage false;

 

20180406030923_1.jpg

20180406025600_1.jpg

Share this post


Link to post
Share on other sites

Hey @M6mal

1. Download this by @BetterDeadThanZed https://www.dropbox.com/s/32v7i81loel8l2m/a3_custom.pbo?dl=1


2. @ExileServer_Esseker\addons\a3_custom\init\fn_init.sqf
 

Spoiler

/*
include map content.
Call compile preprocess'ing them is MUCH better.
Creating spawn/execvm's IS BAD unless the script is a long running one.
If you try call compile and it all goes to shit, use execvm =P
*/
//[] execVM "a3_custom\mapcontent\name_of_addon.sqf";

diag_log "Starting Custom Content PBO";
//#include "\x\addons\a3_custom\mapcontent\chernarus_replace.sqf"

[] execVM "\x\addons\a3_custom\mapcontent\flags.sqf";
 

 

3. @ExileServer_Esseker\addons\a3_custom\mapcontent\flags.sqf

Spoiler

///flags
_pos = [9862.9,880.064,0];
_this = createVehicle ["FlagPole_F", _pos, [], 0, "CAN_COLLIDE"];
_object setPos _pos;
_object forceFlagTexture "textures\logo.paa";   //your flag logo here
_object allowDamage false;

_pos = [4281.6,1709.89,0];
_this = createVehicle ["FlagPole_F", _pos, [], 0, "CAN_COLLIDE"];
_object setPos _pos;
_object forceFlagTexture "textures\logo.paa";   //your flag logo here
_object allowDamage false;

_pos = [11746.4,7829.4,0];
_this = createVehicle ["FlagPole_F", _pos, [], 0, "CAN_COLLIDE"];
_this setPos _pos;
_this forceFlagTexture "textures\logo.paa";   //your flag logo here
_this allowDamage false;

_pos = [7296.25,9437.45,0];
_this = createVehicle ["FlagPole_F", _pos, [], 0, "CAN_COLLIDE"];
_this setPos _pos;
_this forceFlagTexture "textures\logo.paa";   //your flag logo here
_this allowDamage false;

_pos = [6112.44,6918.54,0];
_this = createVehicle ["FlagPole_F", _pos, [], 0, "CAN_COLLIDE"];
_this setPos _pos;
_this forceFlagTexture "textures\logo.paa";   //your flag logo here
_this allowDamage false;

_pos = [940.307,9183,0];
_this = createVehicle ["FlagPole_F", _pos, [], 0, "CAN_COLLIDE"];
_this setPos _pos;
_this forceFlagTexture "textures\logo.paa";   //your flag logo here
_this allowDamage false;

_pos = [2093.9,7701.79,0];
_this = createVehicle ["FlagPole_F", _pos, [], 0, "CAN_COLLIDE"];
_this setPos _pos;
_this forceFlagTexture "textures\logo.paa";   //your flag logo here
_this allowDamage false;

_pos = [9960.77,10893,0];
_this = createVehicle ["FlagPole_F", _pos, [], 0, "CAN_COLLIDE"];
_this setPos _pos;
_this forceFlagTexture "textures\logo.paa";   //your flag logo here
_this allowDamage false;

_pos = [1008.58,2778.86,0];
_this = createVehicle ["FlagPole_F", _pos, [], 0, "CAN_COLLIDE"];
_this setPos _pos;
_this forceFlagTexture "textures\logo.paa";   //your flag logo here
_this allowDamage false;

_pos = [11789.5,4712.8,0];
_this = createVehicle ["FlagPole_F", _pos, [], 0, "CAN_COLLIDE"];
_this setPos _pos;
_this forceFlagTexture "textures\logo.paa";   //your flag logo here
_this allowDamage false;

4. Create a folder "textures" & add it to your mission folder. Drop your logo in Exile.YourMissionFile\textures\logo.paa
 

5. Make sure the logo is .paa format & 512x256px (jpg might work, paa is a sure win).

To make a .paa file, save your logo as png with a resolution of 512x256px (you can google online picture resizer if you don't have Photoshop).

Now open the png in TexView, change the drop down menus to read:

(top left drop down) "RGBA"

(bottom left drop down) "DXT1" (this sometimes changes to DX5 after you save)

(right drop down) "None"


Download TexView here:

http://www.armaholic.com/page.php?id=1563

For Step one I used this guide & put it in the @ExileServer/addons folder:

 

Share this post


Link to post
Share on other sites

To export the flags use @maca134's editor:

Use the drop down menu & "export all".

You get something like this:

Spoiler

private _objects = [
    [" FlagPole_F ",[4647.68,5918.04,149.011],[[-0.274391,-0.961618,0.000444362],[0.00161945,0,0.999999]],[true,false]]
];
{
    private _object = (_x select 0) createVehicle [0,0,0];
    _object setPosASL (_x select 1);
    _object setVectorDirAndUp (_x select 2);
    _object enableSimulationGlobal ((_x select 3) select 0);
    _object allowDamage ((_x select 3) select 1);
} forEach _objects;

 

What you need is the first two numbers & add them to your flags.sqf file

The above example flag.sqf would be:

Spoiler

_pos = [4647.68,5918.04,0];
_this = createVehicle ["FlagPole_F", _pos, [], 0, "CAN_COLLIDE"];
_object setPos _pos;
_object forceFlagTexture "textures\logo.paa";   //your flag logo here
_object allowDamage false;

The last number I made 0 which is how far you want the flag above the ground.

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.