• There seems to be an uptick in Political comments in recent months. Those of us who are long time members of the site know that Political and Religious content has been banned for years. Nothing has changed. Please leave all political and religious comments out of the forums.

    If you recently joined the forums you were not presented with this restriction in the terms of service. This was due to a conversion error when we went from vBulletin to Xenforo. We have updated our terms of service to reflect these corrections.

    Please note any post refering to a politician will be considered political even if it is intended to be humor. Our experience is these topics have a way of dividing the forums and causing deep resentment among members. It is a poison to the community. We appreciate compliance with the rules.

    The Staff of SOH

  • Server side Maintenance is done. We still have an update to the forum software to run but that one will have to wait for a better time.

pilot/driver visible not visible

Cees Donker

Administrator
Staff member


This is a model I made for FSX. I made this in FSDS 3.51. I want the driver (the figure you see) to appear when the engine is ON and the exit (door_0 ) is OPEN. The hatch you see is door_0. I'm not very savvy with codes, but I tried several ones, to no avail. This is the code I used in modeldef.xml. Nothing happens. Help is very much appreciated

<Animation name="Driver" guid="79cc48e2-cad5-485d-9bf0-4c1d75acd3d3" length="100" type="Sim" typeParam2="Driver" typeParam="AutoPlay" />

<PartInfo>

<Name>Driver</Name>

<Visibility>

<Parameter>

<Code>

(A:EXIT CLOSED, bool) ! ==

(A:p
yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
ROP1 RPM PCT:1, percent) 1.00 <

and

if{ 0 } els{ 1 }

</Code>

</Parameter>

</Visibility>

</PartInfo>

Can anyone help me to a working code? I know I could opt for pilot_vanish, but I really want the driver only to appear when the hatch is open.

Thanks in advance!


Cees
 
Maybe you could try this in the <CODE> section. I stole it from the access ladder code from my Mallard but in that case the engine had to be off before the steps appeared so I reversed the code in this case (i.e. engine has to be ON) ............

<Code>
(A:SIM on GROUND, bool) <!-- Forces sim to make sure vehicle is on the ground -->
(A:IS USER SIM,bool) and <!-- Forces sim to make sure it is the user's vehicle and not AI or MP -->
(A:ENG1 HYDRAULIC PRESSURE, psi) 0.1 > and <!--Checks that engine oil pressure is greater than 0.1 PSI (i.e. engine ON) -->
(A:EXIT OPEN:0, percent) 99 > and <!-- Checks that the selected exit is fully open -->
if{ 100 } els{ 0 } <!-- If all the above pass the checks show the part (driver) else do nothing -->
</Code>

That very first line in your code block should also be removed (<Animation name="Driver" guid="79cc48e2-cad5-485d-9bf0-4c1d75acd3d3" length="100" type="Sim" typeParam2="Driver" typeParam="AutoPlay" />) as that info is only required for animated parts and not visibility parts.

Check that the 'driver' has been correctly tagged with a visibility tag using the correct code block too (he won't appear if he has no tag or it is calling the wrong code block).

I must admit I am very rusty as I haven't done any developing in over a year and I haven't even turned on my sim since early May (busy doing other things) but hopefully that code should do the trick.
 
Thanks Larry! I'll try it! Very much appreciated!

Where do I do this ? "Check that the 'driver' has been correctly tagged with a visibility tag using the correct code block too (he won't appear if he has no tag or it is calling the wrong code block)." In the modeldef?

:encouragement:

Cees
 
Where do I do this ? "Check that the 'driver' has been correctly tagged with a visibility tag using the correct code block too (he won't appear if he has no tag or it is calling the wrong code block)." In the modeldef?
You have to tag it in the model using your modelling program i.e. FSDS, GMAX, 3ds MAX, etc. (it may even be possible in MCX but I have no idea how to do that). I have never used FSDS but in GMAX/3ds MAX you would select the model item's parent piece (i.e. the top most item in your 'driver' hierarchy) and then just like you would tag an animation you would pull up the ACES tool but instead of selecting 'animation' you would select 'visibility' and assign the correct visibility code block (i.e. "Driver" in your case) to the part. I have no idea what the steps to do this are in FSDS but there must be a way as it is an essential part of the modelling process.

If you don't have the parent part tagged with the visibility code the sim has no idea what to display when the door/hatch opens. Note: You ONLY have to tag the parent part not all the parts that make up the 'driver' model because if you hide the parent the children will all hide too!
 
Back
Top