• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Condition to start effect

  • Thread starter Thread starter l52
  • Start date Start date

l52

Messages
125
Hi all

I did this ramp lights for FSX with Gmax (you can look it in attach)I have use fx.lamding effect with attach tool ...my problem is:

is there a way to create a condition to ight is on in the night and off in the day? if yes...can you help me?

thanks

Lucio
 

Attachments

Here's what I did:

In the attach tool there is an option 'visibility'. Checking this will allow you to select a condition that determines whether and effect is visible or not.

You can add your own conditions to the 'modeldef.xml' file (in SDK\Environment Kit\Modeling SDK\bin).

You could add:

Code:
    <PartInfo>
        <Name>ramp_light</Name>
        <AnimLength>100</AnimLength>
        <Visibility>
            <Code>
              0 #a# #b# #c# 4 (E:TIME OF DAY, enum) case
            </Code>
        </Visibility>
    </PartInfo>

And replace the #a#, #b#, #c# with 0 or 1 to turn the light off or on during: a=day, b=dusk and dawn, c=night, so:

0 0 1 1 4 (E:TIME OF DAY, enum) case

Means light is on during dusk/dawn and night. (I don't have access to the working code right now, there might be some errors in the above line).


But then I found out about the 'Effect Parameters' You can specify these as well in the Attach Tool. And it seems you can enter for example:

DAWN=0;DAY=0;DUSK=0;NIGHT=1;

there. I haven't tried this though.

Daniel
 
Here's what I did:

In the attach tool there is an option 'visibility'. Checking this will allow you to select a condition that determines whether and effect is visible or not.

You can add your own conditions to the 'modeldef.xml' file (in SDK\Environment Kit\Modeling SDK\bin).

You could add:

Code:
    <PartInfo>
        <Name>ramp_light</Name>
        <AnimLength>100</AnimLength>
        <Visibility>
            <Code>
              0 #a# #b# #c# 4 (E:TIME OF DAY, enum) case
            </Code>
        </Visibility>
    </PartInfo>

And replace the #a#, #b#, #c# with 0 or 1 to turn the light off or on during: a=day, b=dusk and dawn, c=night, so:

0 0 1 1 4 (E:TIME OF DAY, enum) case

Means light is on during dusk/dawn and night. (I don't have access to the working code right now, there might be some errors in the above line).


But then I found out about the 'Effect Parameters' You can specify these as well in the Attach Tool. And it seems you can enter for example:

DAWN=0;DAY=0;DUSK=0;NIGHT=1;

there. I haven't tried this though.

Daniel

Thanks

but this code, have I write it in the 'modeldef.xml'? ...or is sufficient enter DAWN=0;DAY=0;DUSK=0;NIGHT=1 in the 'Effect Parameters' of attach tool?

thanks

Lucio
 
Here's what I did:

In the attach tool there is an option 'visibility'. Checking this will allow you to select a condition that determines whether and effect is visible or not.

You can add your own conditions to the 'modeldef.xml' file (in SDK\Environment Kit\Modeling SDK\bin).

You could add:

Code:
    <PartInfo>
        <Name>ramp_light</Name>
        <AnimLength>100</AnimLength>
        <Visibility>
            <Code>
              0 #a# #b# #c# 4 (E:TIME OF DAY, enum) case
            </Code>
        </Visibility>
    </PartInfo>

And replace the #a#, #b#, #c# with 0 or 1 to turn the light off or on during: a=day, b=dusk and dawn, c=night, so:

0 0 1 1 4 (E:TIME OF DAY, enum) case

Means light is on during dusk/dawn and night. (I don't have access to the working code right now, there might be some errors in the above line).


But then I found out about the 'Effect Parameters' You can specify these as well in the Attach Tool. And it seems you can enter for example:

DAWN=0;DAY=0;DUSK=0;NIGHT=1;

there. I haven't tried this though.

Daniel

Daniel...where I have to insert this condition ..? at the end of 'modeldef.xml' file?...and when I set the 'visibility'option in the attach tool module I found new voice under parameter?

thanks

Lucio
 
Hi Lucio,

The Code part is what should go in to the xml file, if you look in this file you'll see several 'PartInfo' sections when you scroll down. You can add your entry there.

Once you have done so and start GMax, when you click the 'Visibilty' box in the attachpoint tool, a new combobox will appear 'Visibiltiy Objects'. In this box you should be able to find the entry with the name you have added to the xml file.

Likewise... when you check the Effect box in the attachpoint tool, a combobox 'Effect to Attach' will appear. Below it is a field 'Effect Params' that is where you should add the DAY=0.... part. No need to add the 'Visibility' part in this case. (Please note, I haven't actually tried this way of controlling visibility yet).

Daniel
 
Hello Daniel,

i followed your advise and placed the code for the "Time of Day-Visibility" into the 'modeldef.xml' and it shows in GMAX, but when trying to export the model I get a lot of errors!

so here are the lines of my 'modeldef.xml' that I changed ( in blue ):

<Units>bool</Units>
</Sim>
</Parameter>
</Visibility>
</PartInfo>


<PartInfo>
<Name>Licht_bei_Dunkelheit</Name>
<Visibility>
<Code>0 0 1 1 4 (E:TIME OF DAY, enum) case</Code>
</Visibility>
</PartInfo>


<!-- end exterior and interior lights -->
</ModelInfo>


I really do not have any Idea what parameters I would have to change to get it working!
Would you help me please?

Greetings from Vienna
Herbert
 
Back
Top