quakergamer 0 Posted August 28, 2003 Hello, I have been trying making hidden selections on buildings or using the setobjtexture command but it won't work. Everything is defined correctly and im worning if it will work on buildigns ? Thanks Share this post Link to post Share on other sites
AirwolfPL 0 Posted August 29, 2003 Hello,I have been trying making hidden selections on buildings or using the setobjtexture command but it won't work. Everything is defined correctly and im worning if it will work on buildigns ? Thanks Yup it's working correctly on buildings (at least as long as you're setting these buildings using in-game editor, not the wrpedit/visitor) Share this post Link to post Share on other sites
dm 9 Posted August 31, 2003 As a simple rule, if its got CfgVehicles, then hidden selections, custom anims, and event handlers will work. If it doesnt have CfgVehicles, then it wont work Share this post Link to post Share on other sites
quakergamer 0 Posted September 1, 2003 As a simple rule, if its got CfgVehicles, then hidden selections, custom anims, and event handlers will work. If it doesnt have CfgVehicles, then it wont work  Thanks deadmeat and airwolf. Ill try to make it work :S. Thank you ! See ya Share this post Link to post Share on other sites
colonel_klink 0 Posted February 10, 2004 Has anyone actually got this to work on buildings? I se the cfgmodels section for my test object as>> <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class cfgModels { class Default{}; class box: Default { sections[] = {"box"}; }; }; and the cfgvehicles section as: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgVehicles { class All{}; class AllVehicles:All{}; class Land: AllVehicles {}; class Static : Land {}; class Building : Static {}; class NonStrategic : Building {}; class strategic : building{}; class house :nonStrategic {}; class CWK_TestHouse: building { vehicleClass="CWK Addons - Houses"; accuracy=1.000000; scope=2; model=""; //icon= "\cwk_houses\icon.paa"; mapSize=60; armor=2000; destrType="Destructhouse"; }; class CWK_TestHouse1: CWK_TestHouse { displayName="test house"; animated=true; model="\cwk_testbuilding\box.p3d"; ladders[]={}; hiddenselections[] = {"box"}; }; }; Normally if it was a vehicle and I kick off OFP the selection would be hidden, but lo and behold! the selection is still visible. Any ideas out there? Share this post Link to post Share on other sites
BraTTy 0 Posted February 10, 2004 You need the selection named in cfgmodels to make it invisible,if your only swapping textures it wouldn't be needed. (edit: oops you posted the cfgmodels,lol) But I have reasons to think that houses can't have hiddenselections,haven't tried it myself but others have. I dunno of a building with hiddenselections Share this post Link to post Share on other sites
dm 9 Posted February 11, 2004 I dunno of a building with hiddenselections There's various 3rd party billboard and signpost addons out there which utilise hidden selections. The BIS town-name signs do too (there's only 1 model for the signpost, yet a handful of different [names on] signposts ) Share this post Link to post Share on other sites
BraTTy 0 Posted February 11, 2004 Yes true,also a signpack recently released I've had times hidden selections didn't work because i had some of the parts used with other named selections,that could be a cause Share this post Link to post Share on other sites
colonel_klink 0 Posted February 11, 2004 The only sign pack I have seen is the Everon Cartel one. The example above was a simple cube with just one face selected for hidden selection. Still doesn't work. Even tried changing the base cfgmodels to other classes. Share this post Link to post Share on other sites
BraTTy 0 Posted February 12, 2004 K maybe if you base your cfgmodels off vehicle class? Share this post Link to post Share on other sites
vektorboson 8 Posted February 14, 2004 The BIS town-name signs do too (there's only 1 model for the signpost, yet a handful of different [names on] signposts ) Well, as I tried to make town-name signs it didn't work for me with setObjectTexture; and as I remember, BIS used for every town a different model. Share this post Link to post Share on other sites
colonel_klink 0 Posted February 15, 2004 Yep. Actually same model different texture. But not to worry I might leave the models as they are. Share this post Link to post Share on other sites
BraTTy 0 Posted February 18, 2004 I also tried making a tv screen and couldn't get the textures to swap.Just another unfinished project. I haven't toyed with it much since. Share this post Link to post Share on other sites
colonel_klink 0 Posted February 19, 2004 I also tried making a tv screen and couldn't get the textures to swap.Just another unfinished project.I haven't toyed with it much since. Here's a suggestion. make another face and use the rotation animation to flip it into the tv screen body. I've used this with a computer screen on the gatehouse for utopia island, as well as a screen with flashing light panel. In the latter I used a 6 sided object with a different texture on each face, then used a random number between 0 and 5 to flip between the faces. Share this post Link to post Share on other sites
aj_addons 0 Posted February 19, 2004 not just make it a veihicle which you cant enter (ie script a logic into the driving seat) and has a speed of zero? Share this post Link to post Share on other sites
BraTTy 0 Posted February 19, 2004 I also tried making a tv screen and couldn't get the textures to swap.Just another unfinished project.I haven't toyed with it much since. Here's a suggestion. make another face and use the rotation animation to flip it into the tv screen body. I've used this with a computer screen on the gatehouse for utopia island, as well as a screen with flashing light panel. In the latter I used a 6 sided object with a different texture on each face, then used a random number between 0 and 5 to flip between the faces. Ahh like dice, unfortunately I was doing larger than that,like whole videos Not only was I doing the tv screen I have some other ideas I may elaborate on: tv screen movie studio gps Share this post Link to post Share on other sites
colonel_klink 0 Posted February 20, 2004 Really good ideas there, Bratty. Be cool to have animated gifs in game so they could be played on screen. I have played around with animated textures in Max and truespace. Share this post Link to post Share on other sites
jaakko 0 Posted January 18, 2005 Has anyone solved this issue? Im getting that far that i get the selection to be hidden at start, but setObjectTexture doesent work.. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgPatches { class jj_addons { units[] = {jj_station}; weapons[] = {}; requiredVersion = 1.85; }; }; class CfgModels { class Default {}; class jj_station: Default { sections[]= {"hud_blastout", "hud_blastin"}; }; }; class CfgVehicles { class All {}; class AllVehicles: All {}; class Land: AllVehicles {}; class Static : Land {}; class Building : Static {}; class Strategic : Building {}; class Fortress1 : Strategic {}; class jj_station: Fortress1 { model="\jj_station\jj_station"; armor=2000; scope=2; vehicleClass="jj Objects"; displayName="jj Station"; animated=1; hiddenSelections[] = {"hud_blastout", "hud_blastin"}; EDIT: Sorry i was wrong, the texture IS visible. I just percieved it from an angle that didnt display it.. Share this post Link to post Share on other sites
Scanger 0 Posted February 8, 2005 For those who are still wondering about SetObjectTexture on buildings etc, I found this the easiest way to do it. note the "Thing" class in cfgVehicles, if your addon is declared as a normal building without the "Thing" class referenced, more often than not SoT won't work. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class cfgPatches { class tag_myaddon { units[] = {tag_myaddon}; weapons[] = {}; requiredversion = 1.0; }; }; class CfgModels { class Default{}; class tag_myaddon: Default {   sections[]={"hs1","hs2"}; }; }; class cfgVehicles { class All {}; class Thing: All {}; class tag_myaddon: Thing { displayname="My Addon" model="\tag_myaddon\tag_myaddon"; icon="\tag_myaddon\icon.paa"; armor=2000; scope=2; nameSound="building"; hiddenSelections[]={"hs1","hs2"}; }; }; Once that's done, just use this command in the INIT box of a unit, if using in a trigger you must name the unit and reference that name instead of "this" this SetObjectTexture [0,"\tag_myaddon\newtexture1.jpg"] the 0 corresponding to hidden selection "hs1" this SetObjectTexture [1,"\tag_myaddon\newtexture2.jpg"] the 1 corresponding to hidden selection "hs2" And so on and so forth Hope this helps people, i utilised it today making military coffins with flags draped over them, this way you can have any flag u want on the coffin. And since using the "thing" class works it saves me having to declare the coffin as a jeep(which had to be done to get SoT working until i figured that out lol) so no more zooming around in my coffins at 150mph  So you can try that out anyway and see what happens, i tested animations under the "thing" class and everything's cool too, so at least for what i need this will totally cover it. Scanger Share this post Link to post Share on other sites
colonel_klink 0 Posted February 8, 2005 yep thing Class works well for setobjecttexture. Only downside is the mass has to be set fairly high to avoid having the things  (sic) bouncing all over the place.  Share this post Link to post Share on other sites
Scanger 0 Posted February 8, 2005 yup you're right there Colonel_Klink, i had noticed my coffin bouncing a bit and making that "I'm a BMP and i just fell roof first down a hill" kinda noise, turnin the mass up fixed the prob, for the most part it should be cool, i've yet to see a building floating off(well actually i have..no mass in geometry LOD+1 bullet in the side), my point being, make your buildings heavy people Scanger Share this post Link to post Share on other sites
AKK 0 Posted February 14, 2005 Great topic I have been using the Jeep class so this is great. I did as Scanger's CPP suggest. But I have an issue. All my hidden selections are starting out seethrough as if I they were textured with an all alpha texture. But they very much are not. I tested the selections and I can retexture them in the editor. but this starting empty thing has got me. Any ideas. Share this post Link to post Share on other sites
Footmunch 0 Posted February 14, 2005 Great topicI have been using the Jeep class so this is great. I did as Scanger's CPP suggest. But I have an issue. All my hidden selections are starting out seethrough as if I they were textured with an all alpha texture. But they very much are not. I tested the selections and I can retexture them in the editor. but this starting empty thing has got me. Any ideas. AKK - Well, the hidden selections are doing what they are supposed to - hiding When the unit is created, the hidden selections are given a NULL texture and won't be seen. If you want them to _start_ with a texture, then you have to add some setobjecttexture commands to the init event handler: init = "(_this select 0) setobjecttexture[0, ""\myaddon\texture.paa""]" (Or more usually, use an init_vehicle.sqs script to set up the textures) Share this post Link to post Share on other sites
nephilim 0 Posted February 14, 2005 btw has anyone tried using aniamted gifs? maybe not directly applied as a gif (tehn converted to pa) in oxy but appling it ingame via setobject texture (either from addon pbo or misson folder) or does ofp convert these textures ingame? Share this post Link to post Share on other sites
BraTTy 0 Posted February 14, 2005 All my hidden selections are starting out seethrough as if I they were textured with an all alpha texture. But they very much are not. Actually if you don't put your named hidden selections within "cfgmodels" then they will start with a texture and you will be able to still switch textures (based off my original tests) If you need the invisible feature (I do for rolling wheels for example) then you NEED to put the named selections within cfgmodels,then you have the problem of running a init script to set the initial texture Share this post Link to post Share on other sites