Jump to content
  • 0
monkeebhoy

Custom billboards

Question

37 answers to this 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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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;

};

Share this post


Link to post
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""];";
        };

Share this post


Link to post
Share on other sites
  • 0

Can't seem to get the images to load.  Just says "Cannot load image......".  The paths are correct.  I've tried saving them as paa and jpg.  Image dimensions are 1024x512, which works fine for my custom server banner.  Any ideas?

Share this post


Link to post
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.  

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...