![]() |
|
|
|||||||
| Register | Wiki | Downloads | FAQ | Members List | Social Groups | Calendar | Search | Today's Posts | Mark Forums Read |
| Modeling Use this forum for all your modelling related discussions |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Visibilty tag on Aircraft
Hello,
I am trying to make an object appear and disappear with a click on a switch. But I'm new into xml and It's not working in fsx yet. I also have some issues with the mouse click not showing on certain objects. I tried to reset the scale and transform but without success. Code:
<Animation name="TEST_SWITCH" guid="6fb8860d-52a2-4d84-8041-526c6e256644" length="50" type="Sim" typeParam2="TEST_SWITCH" typeParam="AutoPlay" />
<Animation name="TEST_VISIBILITY" guid="28bd9da6-7e2b-40d2-b00c-f0b30fc5c94c" length="50" type="Sim" typeParam2="TEST_VISIBILITY" typeParam="AutoPlay" />
<PartInfo>
<Name>TEST_SWITCH</Name>
<AnimLength>50</AnimLength>
<Animation>
<Parameter>
<Code>(L:testswitch, bool) 100 *</Code>
<Lag>600</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<tooltip_id>TEST_L:VARIABLES</tooltip_id>
<callback_code>
(L:testswitch, bool) ! (>L:testswitch, bool)
</callback_code>
</MouseRect>
</PartInfo>
<PartInfo>
<Name>TEST_VISIBILITY</Name>
<VisibleInRange>
<Parameter>
<Code>(L:testswitch, number) 100 *</Code>
<Lag>10</Lag>
</Parameter>
<minvalue>0</minvalue>
<maxvalue>50</maxvalue>
</VisibleInRange>
</PartInfo>
Thanks
__________________
Sagga Toure Devinci Design and Development (www.3-dev.com) KSAN X released! FSX Gold Ed, Level-d 767, PMDG J41, PMDG 747-8, ConcordeX, Airsim A320, FS2 crew voice. Intel core i7950 oc 3.840 Ghz, corsair xms 3x2Gb ddr3 ram 1666Mhz, Gigabyte x58A-UD3 LGA1336, H70 water cooling, Nvidia GTX570, 64gbSSD, 1T hdd, rocketfish 900W psu, Asus 27", Roswill challenger mid tower case. Saitek X52 Pro flight joystick, Saitek Pro Flight Yoke and Rudder Pedals, TrackIR 5 +TrackCliP PRO |
|
#2
|
|||
|
|||
|
Here is the working. I found it here: http://www.aerodynamika.com/cgi-bin/...num=1311699730
But the code was missing something. Also I had many issues with the different locations of modeldef.xml Did you know that max uses both modeldef files? the one in bin and the one in the plugin folder? I wish I knew it before! ![]() Code:
<Animation name="hide_pilots_yoke" guid="54647385-cff7-679c-a657-9b9cd33e4f12" length="100" type="Sim" typeParam2="hide_pilots_yoke" typeParam="AutoPlay" />
<Animation name="yoke_pilot" guid="54577386-cff7-679c-a658-ab9cd33e4f13" length="100" type="Sim" typeParam2="yoke_pilot" typeParam="AutoPlay" />
<!-- Pilot's Yoke XML Scripts -->
<PartInfo>
<Name>hide_pilots_yoke</Name>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Hide Pilot's Yoke</TooltipText>
<CallbackCode>
(L:YokePilot,bool) ! (>L:YokePilot,bool)
</CallbackCode>
</MouseRect>
</PartInfo>
<PartInfo>
<Name>yoke_pilot</Name>
<Visibility>
<Parameter>
<Code>(L:YokePilot,bool) 0 > if{ 0 } els{ 1 }</Code>
</Parameter>
</Visibility>
</PartInfo>
__________________
Sagga Toure Devinci Design and Development (www.3-dev.com) KSAN X released! FSX Gold Ed, Level-d 767, PMDG J41, PMDG 747-8, ConcordeX, Airsim A320, FS2 crew voice. Intel core i7950 oc 3.840 Ghz, corsair xms 3x2Gb ddr3 ram 1666Mhz, Gigabyte x58A-UD3 LGA1336, H70 water cooling, Nvidia GTX570, 64gbSSD, 1T hdd, rocketfish 900W psu, Asus 27", Roswill challenger mid tower case. Saitek X52 Pro flight joystick, Saitek Pro Flight Yoke and Rudder Pedals, TrackIR 5 +TrackCliP PRO |
|
#3
|
|||
|
|||
|
Hello Devinci,
My humble apologies for not getting to you in time. I had some visibility codes that I could have shared. The yoke hide code is brilliant, works well. I have another that can hide one, unhide another (for engines and cowlings swapouts), and I have one that can switch through 3 items as well (for pilots and military loadouts) that I can share as well. Just let me know. Bill LHC |
|
#4
|
|||
|
|||
|
I went ahead and posted the codes.
This first one is Pilots; male, female, both, none. The fist block is the switch, the other 4 are the Hierarchies that disappear/appear that you attach the pilots (or things) to. Code:
<Animation name="ave_pilot_selector" guid="25CD48DC-E813-4817-902E-0E8D2C229521" length="100" type="Sim" typeParam2="lhc_pilot_selector" typeParam="AutoPlay" />
<PartInfo>
<Name>ave_pilot_selector</Name>
<Animation>
<Parameter>
<Code>
(L:AVEpilot press,bool) 10 *
</Code>
<Lag>100</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Pilot Selector System (%((L:AVE PILOT SHOW,enum))%{case}%{:0}Male)%{:1}Female)%{:2}Couple)%{:3}Empty)%{End}</TooltipText>
<MouseFlags>LeftSingle+LeftRelease</MouseFlags>
<CallbackCode>(M:Event) 'LeftSingle' scmp 0 == if{ (L:PILOT SHOW,enum) 1 + 4 % (>L:PILOT SHOW,enum) 1 (>L:XMLSND38,enum) 1 (>L:AVEpilot press,bool) } (M:Event) 'LeftRelease' scmp 0 == if{ (>L:AVEpilot press,bool) }</CallbackCode>
</MouseRect>
</PartInfo>
<PartInfo>
<Name>ave_pilot_male</Name>
<Visibility>
<Parameter>
<Code>
(L:AVE PILOT SHOW,enum) 0 ==
(L:AVE PILOT SHOW,enum) 2 ==
or
if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
<PartInfo>
<Name>ave_pilot_female</Name>
<Visibility>
<Parameter>
<Code>
(L:AVE PILOT SHOW,enum) 1 ==
if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
<PartInfo>
<Name>ave_pilot_couple</Name>
<Visibility>
<Parameter>
<Code>
(L:AVE PILOT SHOW,enum) 2 ==
if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
<PartInfo>
<Name>ave_no_pilots</Name>
<Visibility>
<Parameter>
<Code>
(L:AVE PILOT SHOW,enum) 3 ==
if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
This one is for engines/cowlings swapping, etc. Code:
<Animation name="lhc_luggage_unloader" guid="33AEF277-7CA7-40a1-95A0-3895B2E8A1DB" length="100" type="Sim" typeParam2="lhc_luggage_unloader" typeParam="AutoPlay" />
<PartInfo>
<Name>lhc_luggage_unloader</Name>
<Animation>
<Parameter>
<Code>
(L:lhc_pushbaggageunload,bool) 10 *
</Code>
<Lag>100</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>LUGGAGE LOAD AND UNLOAD (%((L:LHC_BAGGAGE_UNLOAD,enum))%{case}%{:0}LUGGAGE LOADED)%{:1}LUGGAGE UNLOADED)%{End}</TooltipText>
<MouseFlags>LeftSingle+LeftRelease</MouseFlags>
<CallbackCode>(M:Event) 'LeftSingle' scmp 0 == if{ (L:LHC_BAGGAGE_UNLOAD,enum) 1 + 2 % (>L:LHC_BAGGAGE_UNLOAD,enum) 1 (>L:XMLSND38,enum) 1 (>L:lhc_pushbaggageunload,bool) } (M:Event) 'LeftRelease' scmp 0 == if{ (>L:lhc_pushbaggageunload,bool) }</CallbackCode>
</MouseRect>
</PartInfo>
<PartInfo>
<Name>lhc_baggage_loaded</Name>
<Visibility>
<Parameter>
<Code>
(L:LHC_BAGGAGE_UNLOAD,enum) 0 ==
if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
<PartInfo>
<Name>lhc_baggage_unloaded</Name>
<Visibility>
<Parameter>
<Code>
(L:LHC_BAGGAGE_UNLOAD,enum) 1 ==
if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
On the last one, you would use the first viz as Cowling on, second is Cowling Off. The engine would be linked to Cowling Off, and the Cowling linked to Cowling On. Thus, clicking Cowling Off switch will blink out the cowling and the engine instantly appears at the exact same time. Brilliant code. thanks to Doug Callen for that. Note that these use 'many' L:vars in them, so be careful in resetting them to other functions as they can be very tricky. Last edited by lionheart; 20 Apr 2012 at 13:55. |
|
#5
|
|||
|
|||
|
Quote:
When I first set up Max, I configured it so that it would use only the modeldef.xml file in the ..\bin folder. Which is of course the same copy that GMax uses. Hence I only need to maintain a single source file for everything. The Max exporter will use the paths that you set up in Customize/Configure System Paths/3rd Party Plug-Ins: Code:
New Entry E:\FSX_SDK\Environment Kit\Modeling SDK\3DSM9\Plugins\ New Entry1 E:\FSX_SDK\Environment Kit\Modeling SDK\bin\ The path used by the compiler is of course specified in the CMD line parameter, so it can be located wherever you tell it to look... ...which should be of course the ..\bin folder! ![]() The GMax exporter/compiler automatically uses the single ..\bin\modeldef.xml file.
__________________
Bill Leaming 3d Modeler Max/GMax C & XML Gauge Programmer Eaglesoft Development Group http://eaglesoftdg.com Intel® Core™ i7-3770k 4.2GHz - Crucial 16GB DDR3 - Dual Radeon HD770 1GB DDR5 (Crossfire) - Eco II Watercooling - Win7 64bit Intel® Core™ i7-2600k 3.4GHz - Crucial 4GB DDR3 - NVIDIA GeForce GTX550Ti 1GB - Win7 64bit Intel® Core™ i7-860 2.8GHz - Crucial 8GB DDR3 - NVIDIA GeForce GTS240 1GB - Win8 64bit NOTE: Unless explicitly stated otherwise, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...
Last edited by n4gix; 20 Apr 2012 at 14:07. |
|
#6
|
|||
|
|||
|
Quote:
__________________
Sagga Toure Devinci Design and Development (www.3-dev.com) KSAN X released! FSX Gold Ed, Level-d 767, PMDG J41, PMDG 747-8, ConcordeX, Airsim A320, FS2 crew voice. Intel core i7950 oc 3.840 Ghz, corsair xms 3x2Gb ddr3 ram 1666Mhz, Gigabyte x58A-UD3 LGA1336, H70 water cooling, Nvidia GTX570, 64gbSSD, 1T hdd, rocketfish 900W psu, Asus 27", Roswill challenger mid tower case. Saitek X52 Pro flight joystick, Saitek Pro Flight Yoke and Rudder Pedals, TrackIR 5 +TrackCliP PRO |
|
#7
|
|||
|
|||
|
Quote:
I also use the one in bin for the compile aircraft. I will try to only work on a single modeldef because it's very confusing. Thanks I'll try using both path in max, but I suppose I should delete the modeldef in the plugin folder so that max will use the one in bin? Regards,
__________________
Sagga Toure Devinci Design and Development (www.3-dev.com) KSAN X released! FSX Gold Ed, Level-d 767, PMDG J41, PMDG 747-8, ConcordeX, Airsim A320, FS2 crew voice. Intel core i7950 oc 3.840 Ghz, corsair xms 3x2Gb ddr3 ram 1666Mhz, Gigabyte x58A-UD3 LGA1336, H70 water cooling, Nvidia GTX570, 64gbSSD, 1T hdd, rocketfish 900W psu, Asus 27", Roswill challenger mid tower case. Saitek X52 Pro flight joystick, Saitek Pro Flight Yoke and Rudder Pedals, TrackIR 5 +TrackCliP PRO |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Creating a multi-pose set | Gman | Static Aircraft Model Maker | 0 | 25 Nov 2010 13:27 |
| Making a single static aircraft library | Gman | Static Aircraft Model Maker | 1 | 24 Nov 2010 18:41 |
| Playing Back Sim with Two Aircraft | Mike Truly | General chat | 3 | 01 Jun 2010 08:55 |
| Depicting Parking Spaces in ADE | Phantoms | ScruffyDuck Software Tools (Not ADE) | 42 | 06 May 2007 08:54 |