Jump to content
  • 0

Custom billboards


monkeebhoy

Question

Recommended Posts

  • 0

Ok here is the basics of how to do it...

you have a choice of either serverside through a .pbo or in the mission file... its up to you how you implement it.

In your init.sqf place this line or something similar directed at the mission file folder path of your choice... Im using a custom folder as an example.

[] execVM "custom\billboards.sqf";

In your new folder "custom" place your "billboards.sqf".  
Inside that billboards.sqf add this:
 

if (isServer) then {

_Billboard1 = createVehicle ["Land_Billboard_F", [615.54541,1807.291992,-0.762874], [], 0, "CAN_COLLIDE"];
_Billboard1 setDir 140;
_Billboard1 setPosATL [615.54541,1807.291992,-0.762874];
_Billboard1 setObjectTextureGlobal [0, "custom\billboard.jpg"];

};

 

 
 
Make sure both set of coords match - these will be where your billboard is located.

setDir - sets the direction the billboard faces

 

the last line sets the path to the image to show on the billboard.

 

And there you have it.

 

 

Some example image sizes: Sign - 1024 X 1024 || Flag - 256 X 256.

 

Note: Textures will appear black until a player gets close enough to the object for the server to tell the client to display it.

Link to comment
Share on other sites

  • 0

Images in the .paa format are displayed over distance and can be transparent (like .png, .gif, etc.), but they take more space (bigger file size) than a picture in .jpg format, which can bloat the mission file size.

You can also use 1024x512, 800x600 and any other size You want, the picture just needs to be a multiple of two in height and width.

Link to comment
Share on other sites

  • 0

Thank you. Very helpful and somewhat easy.

In case the armaholic link is bad or goes down I dl'ed from https://community.bistudio.com/wiki/BI_Tools_2.5

As far as the viewing distance, I thought it was pretty far. Did not have any issues with it showing up black. Maybe I will later.

As far as adding multiple billboards, would you recommend using multiple .sqf files and multiple [] execVM lines or just adding inside the one file like below (of course they wouldn't be the same names and locations just learning how to use all the , and { and ; correctly.) I think for simplicity it would be just add multiple in the file but wtf do I know.

if (isServer) then {

_Billboard1 = createVehicle ["Land_Billboard_F", [615.54541,1807.291992,-0.762874], [], 0, "CAN_COLLIDE"];

_Billboard1 setDir 140;

_Billboard1 setPosATL [615.54541,1807.291992,-0.762874];

_Billboard1 setObjectTextureGlobal [0, "custom\billboard.jpg"];

_Billboard1 = createVehicle ["Land_Billboard_F", [615.54541,1807.291992,-0.762874], [], 0, "CAN_COLLIDE"];

_Billboard1 setDir 140;

_Billboard1 setPosATL [615.54541,1807.291992,-0.762874];

_Billboard1 setObjectTextureGlobal [0, "custom\billboard.jpg"];

};

Thanks.

Edit: Saved as .paa worked initially but after a restart the color changed to just blue and black. Re-did the image and used a .jpg. Working now. Still curious about adding other locations.

Link to comment
Share on other sites

  • 0

Any chance someone had used this on a building? I used this and used the class name for a multi story building but the image didn't show up. Wanted a 10 story image bearing down in Cherno.

Edit: In this thread...

people are talking about adding images to the spawn box. Someone asked about buildings also but it never got answered, unless I missed it. Tried to find the answers there but no luck. Not sure which thread to continue this in but I've already started here so...

Below is what I used for my billboard and it worked. So, I replaced billboard with the Tenement building. Nothing shows up. Well, the building shows up but no image. I tested using a billboard and it worked so my image is good. I even teleported inside the building to see if the image was floating dead nutz in the center of the object, to which I could adjust it. I don't know enough but are there certain objects that you can affix images to and other objects you cant?

if (isServer) then {

_Billboard1 = createVehicle ["Land_HouseB_Tenement", [6453.66, 2414.18, 0], [], 0, "CAN_COLLIDE"];

_Billboard1 setDir 0;

_Billboard1 setPosATL [6453.66, 2414.18, 0];

_Billboard1 setObjectTextureGlobal [0, "images\dr.jpg"];

};

Nice images btw ZENITHOVMAN.

Link to comment
Share on other sites

  • 0

Please share how you put it serverside for us less script savy please.

 

Not sure is this best way but works good.

So  download my pbo and edit it as you like.

After you edit add it to epochhive\addons

all what u need to edit is file bilboard.sqf on scripts folder, also add your images same place

 

https://www.dropbox.com/s/lzrnhdxp2gzkcjy/bilboard.pbo?dl=0

Link to comment
Share on other sites

  • 0

@sadboy: That would be awesome, if it works. How is the way, if i have 4 billboards with 4 different picture files? (or more)?

 

Cheers Metal

in script folder make files as example:

 board_pic_1.sqf

 board_pic_2.sqf

 

 

run it from fn_init.sqf

 

inside each board_pic file you can add your own pictures

 

as example 

 

board_pic_1.sqf

if (isServer) then {

private ["_objs"];
_objs = [
	["Land_Billboard_F",[15321.5,17555.1,-0.441535],12.724,[[0.220255,0.975442,0],[0,0,1]],false], //your board coors, last dont have comma
	["Land_Billboard_F",[14620.3,16775.3,0.444588],312.724,[[-0.73463,0.678468,0],[0,0,1]],false]

];

{
	private ["_obj"];
	_obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
	if (_x select 4) then {
		_obj setDir (_x select 2);
		_obj setPos (_x select 1);
		_obj setObjectTextureGlobal [0, "pbo_name\folder_name\your_pic_1.jpg"];//can be PAA format also
	} else {
		_obj setPosATL (_x select 1);
		_obj setVectorDirAndUp (_x select 3);
		_obj setObjectTextureGlobal [0, "pbo_name\folder_name\your_pic_1.jpg"];		
	};
} foreach _objs;

};

board_pic_2.sqf

if (isServer) then {

private ["_objs"];
_objs = [
	["Land_Billboard_F",[15321.5,17555.1,-0.441535],12.724,[[0.220255,0.975442,0],[0,0,1]],false], //your board coors, last dont have comma
	["Land_Billboard_F",[14620.3,16775.3,0.444588],312.724,[[-0.73463,0.678468,0],[0,0,1]],false]

];

{
	private ["_obj"];
	_obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
	if (_x select 4) then {
		_obj setDir (_x select 2);
		_obj setPos (_x select 1);
		_obj setObjectTextureGlobal [0, "pbo_name\folder_name\your_pic_2.jpg"];//can be PAA format also
	} else {
		_obj setPosATL (_x select 1);
		_obj setVectorDirAndUp (_x select 3);
		_obj setObjectTextureGlobal [0, "pbo_name\folder_name\your_pic_2.jpg"];		
	};
} foreach _objs;

};
Link to comment
Share on other sites

  • 0

Thnx a lot! Last question, just for comprehension:

 

["Land_Billboard_F",[15180.2,17362.6,-1.36433],10.4557,[[0.181476,0.983395,0],[0,0,1]],false],

   

 

                                       X           Y              Z         Azimut?         ?               ?

 

 

 

 

How can I Add pictures like this, they are lying on the ground with picture to the bottom (to trigger the picture files in the spawn zone):

 

class Item65
        {
            position[]={8268.373,98.661316,15740.822};
            azimut=547.29858;
            offsetY=0.1;
            id=174;
            side="EMPTY";
            vehicle="UserTexture10m_F";
            skill=0.60000002;
            text="Waldi_1_1_1";
            init="this enableSimulation false; this allowDamage false; [this, 90,0] call BIS_fnc_setPitchBank; this allowDamage false;this setObjectTexture [0, ""pictures\Waldi1.jpg""];";
        };

Link to comment
Share on other sites

  • 0
This is the error:
 
18:04:19 Warning Message: Cannot load texture bilboard\images\mercs_new2.paa.
18:04:19 Warning Message: Cannot load texture bilboard\images\outfitters_new2.paa.
 
Here's the line in the script:
 
_obj setObjectTextureGlobal [0, "bilboard\images\mercs_new2.paa"];

Also tried it this way:

_obj setObjectTextureGlobal [0, "\bilboard\images\mercs_new2.paa"];

And here's a screenshot of the PBO folder structure:

 

MbYksUh.png

 

 

Edit:  I also looked closely at the image properties of the paa files in Texview 2.  They are the same as the paa that I use for my server banner, and it works fine.  

Link to comment
Share on other sites

  • 0

And for the record, it won't work in the mission either.  Same error.  Guess my images are hosed for some reason.  I give up.  lol

 

Edit:  It's not the images.  I tried using my loading.paa for my server load screen, which works fine, and it won't work with that either.

Link to comment
Share on other sites

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
  • Advertisement
  • Discord

×
×
  • Create New...