Jump to content

[FIXED] Trouble with custom billboard


bFe

Recommended Posts

So my custom image wont appear on the billboard.

 

class Item108
{
position[]={1165.994, 0.24269019, 2441.2239};
azimut=-5.0736966;
id=108;
side="EMPTY";
vehicle="SignM_FARP_Winchester_EP1";
init=this SetObjectTexture [0,""billboard.jpg""]";
skill=1.00000;
};

What's wrong?
I've tried with a few different inits but no luck.
 
Link to comment
Share on other sites

Credits go to saintanthony.

 

 

 

In your init.sqf place this line at the bottom.

[] execVM "custom\yourscriptname.sqf";

In the folder "custom" place your "yourscriptname.sqf".  Now in that sqf, put this:

if (isServer) then {

_vehicle_0 = objNull;
if (true) then
{
_this = createVehicle ["WarfareBunkerSign", [10012.61, 17963.418, 0.00016212463], [], 0, "CAN_COLLIDE"];
_vehicle_137 = _this;
_this setVehicleInit "this setObjectTexture [0, ""custom\yoursignhere.jpg""]";
_this setDir 90.629662;
_this setPos [10012.61, 17963.418, 0.00016212463];
};

_vehicle_1 = objNull;
if (true) then
{
_this = createVehicle ["FlagCarrierTFKnight_EP1", [952.39612, 9223.5273, 1.2874603e-005], [], 0, "CAN_COLLIDE"];
_vehicle_476 = _this;
_this setVehicleInit "this SetFlagTexture ""custom\yourflaghere.jpg""";
_this setPos [952.39612, 9223.5273, 1.2874603e-005];
};
};

I've used one sign and one flag as examples above.  As far as the textures go, you will want to refer to one of the BI tutorials for the proper sizes as this will cause it to fail 99% of the time.

Example sizes: Sign - 1024 X 1024 || Flag - 256 X 256.  That's in pixels, btw.

 

Place the two images in "custom" folder indicated above and you are done.  Textures will appear black until a player gets close enough to the object for the server to tell the client to display it.

 

That's it though, you are done.

 
Edited by bFe
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 months later...

I got the billboards working without problems, in editor and in MP.

But with the custom flags I'm struggling for hours now.

 

Doesn't work for me, got always a "cannot load texture" message:

_vehicle_11 = objNull;
if (true) then
{
_this = createVehicle ["FlagCarrierArmex_EP1", [16260.61, 15840.68, 0], [], 0, "CAN_COLLIDE"];
_vehicle_11 = _this;
_this setVehicleInit "this SetFlagTexture ""custom\Map\flag.jpg""";
_this setPos [16260.61, 15840.68, 0];
};

I tried to place the jpg in the root folder, used different classnames for the flag, also only a flag pole, different file sizes for the jpg (always square) but no luck.

Tried to load it with the mission.pbo and also with the mission.sqf from server.pbo

I read all threads about it here in the forums and many others in the internet, but wasn't able to find a working solution for this.

Would be thankful for a push in the right direction.

Link to comment
Share on other sites

  • 2 weeks later...

It really drives me mad that I cannot get this working.

Billboards working fine from the beginnig, so why not the damn flags?

Tried different ways (see below the code) and many other variations like mentioned above.

I read often that it works...so what the hell I'm doing wrong? :angry:

_vehicle_11 = objNull;
if (true) then
{
_this = createVehicle ["FlagCarrierArmex_EP1", [16260.61, 15840.68, 0], [], 0, "CAN_COLLIDE"];
_vehicle_11 = _this;
_this setVehicleInit "_this setFlagTexture ""custom\Map\flag64.jpg""";
_this setPos [16260.61, 15840.68, 0];
};

_vehicle_12 = objNull;
if (true) then
{
_this = createVehicle ["FlagCarrierArmex_EP1", [16257.61, 15837.68, 0], [], 0, "CAN_COLLIDE"];
_vehicle_12 = _this;
_this setVehicleInit "this setFlagTexture ""custom\Map\flag128.jpg""";
_this setPos [16257.61, 15837.68, 0];
};

_vehicle_13 = objNull;
if (true) then
{
_this = createVehicle ["FlagCarrierArmex_EP1", [16254.61, 15833.68, 0], [], 0, "CAN_COLLIDE"];
_vehicle_13 = _this;
_this setVehicleInit "setFlagTexture ""custom\Map\flag256.jpg""";
_this setPos [16254.61, 15833.68, 0];
};
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...