Welcome, Guest Monday 21st April 2014, 13:56:11
   Home   Help Search Login Register  

OFPEC Forum

Author Topic: multiple textures for 1 sign  (Read 774 times)
0 Members and 1 Guest are viewing this topic.
S.Chapman
*
Offline Offline


WWW
« on: 27 Jul 2008, 20:35:41 »

Hello all.

Falcon1 suggested i try to get some help here so hopefully you guys can come through for me.  Any help would be great.


Ok so what i am looking for is this.  I have a sign in mdol format.  I have made several different paa textures for that sign.  What I would like to do is be able to have that 1 p3d placed in game but have a folder that I can place textures in to use for the signs around our base.  I was given a script that does this with flags but I dont understand scripting, regardless of how many tutorials i read on it.  Some people just arent coders and im one of them. 


this is the flag script, if anyone can tell me how to get this same thing with a sign.  Oh id use this exact script but this makes the flags wave in the wind which of course I dont want the signs to do. 

Code:
version=11;
class Mission
{
addOns[]=
{
"cacharacters",
"CAMisc",
"schmalfelden"
};
addOnsAuto[]=
{
"cacharacters",
"CAMisc",
"schmalfelden"
};
randomSeed=14005763;
class Intel
{
startWeather=0.100000;
forecastWeather=0.300000;
year=2007;
month=7;
day=7;
hour=14;
minute=0;
};
class Groups
{
items=1;
class Item0
{
side="WEST";
class Vehicles
{
items=2;
class Item0
{
position[]={3444.693359,483.725494,4648.723633};
id=0;
side="WEST";
vehicle="SoldierWB";
player="PLAYER COMMANDER";
leader=1;
skill=0.600000;
};
class Item1
{
position[]={3467.019043,483.391785,4647.830566};
id=1;
side="WEST";
vehicle="SoldierWB";
player="PLAY CDG";
skill=0.600000;
};
};
};
};
class Vehicles
{
items=6;
class Item0
{
position[]={3463.615234,483.458527,4694.694336};
id=2;
side="EMPTY";
vehicle="FlagCarrierWest";
skill=0.600000;
};
class Item1
{
position[]={3449.094971,483.725494,4694.571777};
id=3;
side="EMPTY";
vehicle="FlagCarrierWest";
skill=0.600000;
init="this setFlagTexture ""flags\alpha.jpg""; call compile ""[3, this] execvm """"h1lqunxpvd.sqf"""";"";";
};
class Item2
{
position[]={3441.358398,483.725494,4694.571777};
id=4;
side="EMPTY";
vehicle="FlagCarrierWest";
skill=0.600000;
init="this setFlagTexture ""flags\Bravo.jpg""; call compile ""[3, this] execvm """"h1lqunxpvd.sqf"""";"";";
};
class Item3
{
position[]={3432.516846,483.725494,4694.295898};
id=5;
side="EMPTY";
vehicle="FlagCarrierWest";
skill=0.600000;
init="this setFlagTexture ""flags\HHC.jpg""; call compile ""[3, this] execvm """"h1lqunxpvd.sqf"""";"";";
};
class Item4
{
position[]={3422.294678,483.725494,4695.124512};
id=6;
side="EMPTY";
vehicle="FlagCarrierWest";
skill=0.600000;
init="this setFlagTexture ""flags\ODA.jpg""; call compile ""[3, this] execvm """"h1lqunxpvd.sqf"""";"";";
};
class Item5
{
position[]={3456.002197,483.607819,4694.848145};
id=7;
side="EMPTY";
vehicle="FlagCarrierWest";
skill=0.600000;
init="this setFlagTexture ""flags\firstcav.jpg""; call compile ""[3, this] execvm """"h1lqunxpvd.sqf"""";"";";
};
};
};
class Intro
{
addOns[]=
{
"schmalfelden"
};
addOnsAuto[]=
{
"schmalfelden"
};
randomSeed=13240323;
class Intel
{
startWeather=0.100000;
forecastWeather=0.300000;
year=2007;
month=7;
day=7;
hour=14;
minute=0;
};
};
class OutroWin
{
addOns[]=
{
"schmalfelden"
};
addOnsAuto[]=
{
"schmalfelden"
};
randomSeed=16682499;
class Intel
{
startWeather=0.100000;
forecastWeather=0.300000;
year=2007;
month=7;
day=7;
hour=14;
minute=0;
};
};
class OutroLoose
{
addOns[]=
{
"schmalfelden"
};
addOnsAuto[]=
{
"schmalfelden"
};
randomSeed=6076419;
class Intel
{
startWeather=0.100000;
forecastWeather=0.300000;
year=2007;
month=7;
day=7;
hour=14;
minute=0;
};
};
Logged

xfire - frgpugs
Gnat
Addons Depot
Administrator
*****
Offline Offline


I Bite!


WWW
« Reply #1 on: 28 Jul 2008, 02:29:49 »

Pretty sure you are not going to be able to use flags, the ArmA engine flaps those no matter what u do.

I'd suggest your solution is using "hiddensections" and the setobjecttexture commands
http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=s#311
http://community.bistudio.com/wiki/setObjectTexture

Note the BIKI note on MP
This option would allow almost any texture to be assigned.

Another way is to place ALL pictures into a multi-layered sign, then use the HIDE animation to hide all but 1.
I'd suggest that would be easier.
This option means all your tectures must be pre-assigned.




Logged
S.Chapman
*
Offline Offline


WWW
« Reply #2 on: 30 Jul 2008, 15:42:57 »

ok thats perfect, thanks a ton gnat.  I dont know about putting them all on and hiding the ones i dont want as these textures will most likely change as the information changes around whats on them.  But the hiddenobjects will most likely work great if i can figure out how to code the file
Thanks again
Logged

xfire - frgpugs
Sparky
Moderator
*****
Offline Offline



WWW
« Reply #3 on: 01 Aug 2008, 08:06:33 »

as Gnat said in order to make it MP compatible, although i don't know if it works on objects. But we use it on Our Leopard and our Camo net is now MP compatble.

The general idea is to use animations and type="hide", but let's get started of how you can achieve that.

1)create your model sign. imagene that the sign is let's say rectangle, the front face supposed to be the sign texture, select the 1st face, create a selection with the front face and name it face_1, after paste it in a new lod, change the texture path to an other sign texture, rename the selection as face_2, paste it back, it should be at exactly same position as the previus face, and in your working lod, you should have 2 selections face_1 and face_2 with different textures, repeat untill you have all the faces with their appropriate sign texture on them, and the relative selection names.
2)create a model.cfg file.
example
class CfgSkeletons
{
   class My_sign_skel
   {
      isDiscrete=0;
      skeletonInherit="";
      skeletonBones[]=
      {   
         "face_1","",
                        "face_2","",

                        list all you face selection names here
                };
};};
class CfgModels
{
   class My_Sign
   {
      sectionsInherit="";
      sections[]=
      {
                  "face_1,"face_2", list of all selection names here
             
                 };
               skeletonName="My_sign_skel";
      class Animations
      {   
                        class face_1
         {
            type="hide";
            selection="face_1";
            sourceAddress="user";
         };
                       class face_2
         {
            type="hide";
            selection="face_2";
            sourceAddress="user";
         };
                       list here all the selection names as classesfor the appropriate signs
                  };
};};

ok now your p3d should be named exactly with the same name as the class in CfgModels example My_Sign

3)now, you should create a script and put it in the int of the config (I'm not sure if the objects use event handlers if not you should create mission scripts)
sample script for init. here from all the faces you want to leave only face_1 selection sign

_sign = _this;

_sign animate ["face_2",1];
_sign animate ["face_3",1];
list here all the selections faces that you don't want to be displayed, exclude only the one you want to be visible.

you can also use the vehicle's init.
example
put a sign on the editor, and name it biou, the in the init field of the sign write
biou animate["face_2",1];biou animate["face_3",1];....etc etc...

Thinks to remember.
1)by default the hide type is on, that means that if you don't use any script, all faces will be visible


I hope that helps.
this way you can beat MP setobjecttexture incompatibility, but again i don't know if it works for objects.
« Last Edit: 01 Aug 2008, 12:43:41 by XSparky » Logged
Gnat
Addons Depot
Administrator
*****
Offline Offline


I Bite!


WWW
« Reply #4 on: 01 Aug 2008, 12:09:12 »

this way you can beat MP setobjecttexture incompatibility, but again i don't know if it works for objects.


Thanks XSparky, but just 1 clarification for all, setobjecttexture is NOT MP incompatibile, its you just has to run a client script also to ensure everone sees the same.
Logged
Sparky
Moderator
*****
Offline Offline



WWW
« Reply #5 on: 01 Aug 2008, 12:42:09 »

off course, that's why i say "beat" MP setobjectTexture "incompatibility", sorry but my English suck so much...
that i should said. "beat" setobjectTexture MP "incompatibility"...
as for the if it works for objects i meant the model animation for objects with user action through event handlers (mostly in this).
Anyway, i think that my last phrase was quite confusing...
thanks for the clarification.
 Good
Logged
S.Chapman
*
Offline Offline


WWW
« Reply #6 on: 10 Aug 2008, 20:23:56 »

guys thank you so much, that was EXACTLY what i needed to know
Logged

xfire - frgpugs
johnnyboy
OFPEC Patron
****
Offline Offline

Matan los Pantalones!!!


« Reply #7 on: 10 Aug 2008, 22:01:04 »

Chapman,

What you are doing is very worthwhile for mission makers.  A custom sign addon, where mission makers need only have the .PAA file to make any sign they want is really cool.

Please share your end result!

johnnyboy
Logged

El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...
Pages: [1]   Go Up
  Send this topicPrint  
 
Jump to: