Jump to content
  • 0

Adding an image to a billboard?


PryMary

Question

Hey Guys,

 

OK I have one billboard that's at the Branibor trader on Origins tavi map.

 

I would like to replace the billboard image with a different one, however I have managed to surpass the issue where that specific trader items/object would not come into the server but the image still is not showing on the billboard!

 

I have this error in the RPT:

 

13:29:48 Error in expression <setObjectTexture [0, "safezone.jpg"]>
13:29:48   Error position: <[0, "safezone.jpg"]>
13:29:48   Error Missing ;
13:29:48 Error in expression <setObjectTexture [0, "safezone.jpg"]>
13:29:48   Error position: <[0, "safezone.jpg"]>
13:29:48   Error Missing ;
 
The line(s) in question are:
 
_vehicle_176 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Bilboard_Escape", [7391.1621, 4275.0376, -1.1444092e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_176 = _this;
  _this setDir -48.645615;
  _this setVehicleInit "setObjectTexture [0, ""safezone.jpg""]";
  _this setPos [7391.1621, 4275.0376, -1.1444092e-005];
 };

The safezone.jpg is in the mission root, I am guessing this is the right place to put it or would I have to have it in the server.pbo (kinda makes sense too, but what path would I put?)

 

I have also tried this:

 

_vehicle_176 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Bilboard_Escape", [7391.1621, 4275.0376, -1.1444092e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_176 = _this;
  _this setDir -48.645615;
  _this setVehicleInit "setObjectTexture [0, ""\z\addons\dayz_server\map_update\safezone.jpg""]";
  _this setPos [7391.1621, 4275.0376, -1.1444092e-005];
};
 
But results in this in the RPT, and does not show in-game:
 
13:50:57 Error in expression <setObjectTexture [0, "\z\addons\dayz_server\map_update\sa>
13:50:57   Error position: <[0, "\z\addons\dayz_server\map_update\sa>
13:50:57   Error Missing ;
13:50:57 Error in expression <setObjectTexture [0, "\z\addons\dayz_server\map_update\sa>
13:50:57   Error position: <[0, "\z\addons\dayz_server\map_update\sa>
13:50:57   Error Missing ;
 
I don't see where I am missing an ; 
 
Sorry for being noob, not added an image like this before!

 

Kind regards,

 

Pry

Link to comment
Share on other sites

Recommended Posts

  • 0

hi there the line needs to be:

  _this setVehicleInit "this setObjectTexture [0, ""safezone.jpg""];";

and the picture needs to be in the missionfile, otherwise players will not see it!

Link to comment
Share on other sites

  • 0

// Add Signs Below this Line

// Sign Location <--- change to your loc
  _this = createVehicle ["WarfareBunkerSign", [0000.0000, 0000.0000], [], 0, "CAN_COLLIDE"];
  _sign1 = _this;
  _this setDir 0.00;
  _this setVehicleInit "this SetObjectTexture [0,""addons\Images\FSign\test_sign_512x512.jpg""]";
  _this setPos [0000.0000, 0000.0000];

Link to comment
Share on other sites

  • 0

Dude's!! Feel like such a noob!! Searched the forums (yes I know I should of to start with my bad)

 

Also yes, if I keep it in the server it's giving me an error saying not found. so if i put:

 

  _this setVehicleInit "this setObjectTexture [0, ""safezone.jpg""]";

 

and have the image file in the root mission file that will hopefully work :p

 

Shall report back and hopefully be resolved :P

 

Thank you for your help though fella's mucho appreciated.

 

Pry

Link to comment
Share on other sites

  • 0

Well this sucks! Done all that and it's still not showing! The image size is 1024x1024 and jpg

 

I want to use this image:

 

ZHZLgQg.jpg

 

I used PS to resize to 1024x1024 making it square as I read from my searching it has to be a square dimension of either (for large signs) 512x512 or 1024x1024

 

So what am I doing wrong now?

 

Pry

Link to comment
Share on other sites

  • 0

probably you are using the wrong billboard for it, i think not all are able to display custom textures.

try using the one insertcoins posted WarfareBunkerSign

Link to comment
Share on other sites

  • 0

tee hee thats the exact video I followed too!!! OK next thing to change sign used as that MAP_Bilboard_Escape does not allow textures to be added. Just so you all know.

 

Will try the WarfareBunkerSign and report back. I will try the 1024x1024 res as well.

 

Thanks for all your help with this guys much appreciated.

 

Pry

Link to comment
Share on other sites

  • 0

aaaaahhh never knew that! I'm trying to slap it on this one: MAP_Bilboard_Escape

you can only assign textures to objects that has named hidden selections. For example SignM_FARP_Winchester_EP1 has one.

 

also this code can be used to change texture on runtime if spawning signs using script:

_myLocation = player modelToWorld [0,2,0]; // 2 meters in front of player
_mySign = createVehicle ['SignM_FARP_Winchester_EP1', _myLocation, [], 0, 'CAN_COLLIDE'];
_mySign setDir ((getDir player)-180); //not sure about syntax, just woke up
_mySign setVehicleInit 'this setObjectTexture [0, ''custom\mysign.paa''];';

Another example - using fnSelfActions on cursorTarget to setVehicleInit would change it's texture, too.

You can even generate random colors for SUV (or many other vehicles that has named selection (usually "camo" or "camo1")) like that, lol.

Link to comment
Share on other sites

  • 0

yarr it works brilliantly now :) Thank you for all your help guys. Will be making an advertisement video for the server I'm working on so you can see the signs etc. If anyone wants the locations / code I can post it here for you... Also Raymix you just blew my mind with your answer :) :)

 

Pry

Link to comment
Share on other sites

  • 0

Can anyone please  post a step by step walk through, this one sort of goes back and forth with "fixes" and isn't very concise.  

 

pryMary would it be possible to explain the steps you took in sequential order that got this working. Which sign you actually used that gave you the ability to have the jpg display,

 

Also which code did you use for the fix (example) 

vehicle_0 = objNull;

if (true) then
{
  _this = createVehicle ["WarfareBunkerSign", [5161.7271, 4841.2168], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;    <------- *** did you keep this vehicle or set it to "sign" as another poster mentioned-----------------
  _this setDir -9.5237703;
  _this setVehicleInit "setObjectTexture [0,""safezoneflag.jpg""]";
  _this setPos [5161.7271, 4841.2168];

};

 

and which sign did you end up using? did you keep  the WarfareBunkerSign     or did you go with SignM_FARP_Winchester_EP1 

 

Thank you in advance . 

Link to comment
Share on other sites

  • 0

Disregard my above post. I got it working using this code  

 

EXAMPLE:

if (isServer) then {

_vehicle_0 = objNull;
if (true) then
{
  _this = createVehicle ["SignM_UN_Base_EP1", [5161.7271, 4841.2168], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;
  _this setDir -9.5237703;
  _this setVehicleInit "this setObjectTexture [0,""safezoneflag.jpg""]";
  _this setPos [5161.7271, 4841.2168];
};
 
-safzoneflag is what I called my picture you can name your  picture anything just be sure the name's reflected there. 
 
Drop your actual jpg or paa picture in to your mission PBO and your good..
 
Thank you to the previous posters without them I couldn't have done this.. 
 
Also there's another thread here : 
Link to comment
Share on other sites

  • 0

Sorry for not replying sooner and I'm glad you got it sorted. Yes I continued to use the WarfareBunkerSign and had the image size at 1024x1024 in jpg format located in the root of the mission file.

 

If anyone knows of the Signs that are allowed to have custom textures applied, perhaps post them here so we all know which can / cannot support this. It would be great if just 1 of the big billboards worked :P

Link to comment
Share on other sites

  • 0

When you say root of the mission pbo, you mean the root level in dayz_server.pbo?  Or the mission within it?  In my case dayz_server.pbo/missions/Dayz_Epoch_13.Tavi?

 

Thanks,

Bob

root is where your init.sqf, mission.sqm and description.ext are at for MPMissions, nothing to do with dayz_server

Link to comment
Share on other sites

  • 0

Can someone tell what flag pole to use or what i am doing wrong. I tried the plan white flag and my logo is not there. the billboard worked fine. I made my pic 256x256 and put it in the root of the mission.  the script is below.

 

if (isServer) then {
 
_vehicle_1 = objNull;
if (true) then
{
  _this = createVehicle ["SignM_UN_Base_EP1", [6417.5459, 7779.8735, 0.00], [], 0, "CAN_COLLIDE"];
  _vehicle_1 = _this;
  _this setDir 35.629143;
  _this setVehicleInit "this setObjectTexture [0,""billboard.jpg""]";
  _this setPos [6417.5459, 7779.8735, 0.00];
};
 
_vehicle_3 = objNull;
if (true) then
{
  _this = createVehicle ["FlagCarrierWhite_EP1", [6354.6035, 7792.2554, -0.00012207031], [], 0, "CAN_COLLIDE"];
  _vehicle_3 = _this;
  _this setDir 127.06387;
  _this setVehicleInit "this setObjectTexture [0,""flag.jpg""]";
  _this setPos [6354.6035, 7792.2554, -0.00012207031];
  
};
 
};
Link to comment
Share on other sites

  • 0

So after looking around in the forums and watching a video i still can not get the flag to work.

I did change a line,  _this setVehicleInit "this SetFlagTexture "flag.jpg"";

My script below

 

if (isServer) then {
_vehicle_3 = objNull;
if (true) then
{
  _this = createVehicle ["FlagCarrierWhite_EP1", [6354.6543, 7792.2114, -0.00012207031], [], 0, "CAN_COLLIDE"];
  _vehicle_3 = _this;
  _this setDir 127.06387;
  _this setVehicleInit "this SetFlagTexture "flag.jpg"";
  _this setPos [6354.6543, 7792.2114, -0.00012207031];
  
};
 
};
Link to comment
Share on other sites

  • 0

you can only assign textures to objects that has named hidden selections. For example SignM_FARP_Winchester_EP1 has one.

 

also this code can be used to change texture on runtime if spawning signs using script:

_myLocation = player modelToWorld [0,2,0]; // 2 meters in front of player
_mySign = createVehicle ['SignM_FARP_Winchester_EP1', _myLocation, [], 0, 'CAN_COLLIDE'];
_mySign setDir ((getDir player)-180); //not sure about syntax, just woke up
_mySign setVehicleInit 'this setObjectTexture [0, ''custom\mysign.paa''];';

Another example - using fnSelfActions on cursorTarget to setVehicleInit would change it's texture, too.

You can even generate random colors for SUV (or many other vehicles that has named selection (usually "camo" or "camo1")) like that, lol.

Raymix, how did you figure that out?  "objects that have named hidden selections" ?  this would explain a lot.  Reason I am asking is ... so we can find any other object(s) like this. 

 

UPDATE:  'SignM_FARP_Winchester_EP1' does not work for images.  "SignM_UN_Base_EP1" does work.

clip from mission.biedi file.

55fddb96b0bc6_2015-09-19_15_00_59-C__Use

clip from mission.sqf file

55fddb9adbf7f_2015-09-19_15_03_03-C__Use   

FARP is coded exactly the same manner at the above UN sign. UN sign works with new image, FARP does not. ("?")  this is "Editor only" should work in the editor and ingame?

Edited by Just_R
Link to comment
Share on other sites

  • 0

Raymix, how did you figure that out?  "objects that have named hidden selections" ?  this would explain a lot.  Reason I am asking is ... so we can find any other object(s) like this. 

One way is to google that and hope someone posted a list of them.
Another way is to spawn all billboards around you and try to apply generated texture on 1 or 2 indexes with hopes it changes colors (means texture will work), Like I did here...
Third way is to download unbinarized p3d files and open them with object builder and look for named selections.
And finally, you could also just open model.cfg file for each billboard and look for named selections define there.

Link to comment
Share on other sites

  • 0

One way is to google that and hope someone posted a list of them.
Another way is to spawn all billboards around you and try to apply generated texture on 1 or 2 indexes with hopes it changes colors (means texture will work), Like I did here...
Third way is to download unbinarized p3d files and open them with object builder and look for named selections.
And finally, you could also just open model.cfg file for each billboard and look for named selections define there.

 

You and couple of others really help when they give input.  A lot of us have a general knowledge of how things work.  I've done the billboard spawning (within reason).  I will check out the data_pack and the .cfg's. 

Didn't MACA have custom billboards with the ones you would see when traveling from Krutoy Cap to Berezino? the larger variety? I could be wrong it's been ages since I've been on a CCG server.

Side Question: How did you get infiSTAR working with the 3d.live.mission.... ?

2015-09-19 15_00_59-C__Users_Media_Documents_ArmA 2 Other Profiles_I%20Ate%20Yoda_missions_a loc tes.png

2015-09-19 15_03_03-C__Users_Media_Documents_ArmA 2 Other Profiles_I%20Ate%20Yoda_missions_a loc tes.png

Edited by Just_R
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...