Problem:I have a series of ammo boxes which use the same model
There is a selection on the model called "label"
For each different ammocrate class, i setobjecttexture to the label, different "text"
however when previewing the ammocrate classes in game, i dont see the texture that i have set for that particular class
I didnt makde the model and have no clue about model making, however the modeller assures me the ammocrate.p3d is correct
Heres the various excerts from the config, and a snippet from the .hpp file that defines the crates
NB>> the ammocrate model is called ammocrate.p3d
Image size of textures are 512*128 .paa filesclass CfgModels
{
class Default{};
class ammocrate: Default
{
sections[]={"label"};
};
};
NB>> I inherit the ammocrates from "thing" due to the fact, the BIS ammocrates inherit from strategic:Building and i read somewhewre you cannot setobjecttexture to buidlings classI highlighted the relevant init eventhandler section
class TxU_BaseCrate:thing
{
scope=0;
accuracy=1000;
model="\Tx_Utils\Mdl\ammocrate";
vehicleClass="TxU AmmoCargo";
transportMaxWeapons=2000;
transportMaxMagazines=8000;
class TransportWeapons {};
class TransportMagazines {};
};
//// BASE DEFINE Crate ////
class TxU_AmmoCrate:TxU_BaseCrate
{
scope=2;
displayName="Ammo Crate";
class EventHandlers
{
init = "(_this select 0) setobjecttexture [0,{\tx_utils\mdl\aclab.paa} ]; if(format[{%1},TxU_On]=={scalar bool array string 0xfcffffef})then{_this call loadfile{\Tx_Utils\TxU_init.sqf};};_this exec{\Tx_Utils\Cargo\Cargo_Init.sqs};";
};
class UserActions
{
class Carry
{
displayName="Carry Ammo crate";
position="Achse1";
radius=2.5;
condition="alive this";
statement="this exec ""\Tx_Utils\cargo\cargo_carry.sqs"";";
};
};
};
class TxU_WeaponsCrate:TxU_BaseCrate
{
displayName="Weapons Crate";
scope=2;
class EventHandlers
{
init = "(_this select 0) setobjecttexture [0,{\tx_utils\mdl\weplab.paa} ]; if(format[{%1},TxU_On]=={scalar bool array string 0xfcffffef})then{_this call loadfile{\Tx_Utils\TxU_init.sqf};};_this exec{\Tx_Utils\Cargo\Cargo_Init.sqs};";
};
class UserActions
{
class Carry
{
displayName="Carry Weapons crate";
position="Achse1";
radius=2.5;
condition="alive this";
statement="this exec ""\Tx_Utils\cargo\cargo_carry.sqs"";";
};
};
};
and just incase there is someone about who can check the label selection is set up correctly, here's the model (unformatted)
http://www.terox.nildram.co.uk/ofpec/mdl.rarif the entire addon is required, i can make that possible via a pm, it isnt ready for beta testing just yet
Thanks very much in advance of any help offered, this has been bugging me for 2 weeks now