• 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.

Demo Model Timer for Appearance

Messages
10,163
Country
us-arizona
Hey all,

I wish to create a MDL file that disappears after a certain period of time. This will be a 'demo' model. The timer would last for 10 min's and then hide the model.

This code would be written into the MDL file itself so that it could not be modified out.

Is there anything that I should probably know about making such a timer? I was thinking of making a 10 min. timer, then initiate a 'hide' command. I was 'thinking', what if they clicked 'reload aircraft'. Would that simply reload it and restart the model with visibility back on? Is there a way to turn off visibility via computer system time?

I had seen some very nice scenery once of an airport, Zurich. It was a demo. After 6 min's, it disappeared, but for the short amount of time, you could slew around it and check it out. You could not restart it again. How might one do this? Maybe a timer that 'restarted' its 10 min's to unhide, then restart it to hide again, so it was in a loop? If it read the 'total time' log and date, then perhaps it might be lockable so that at least 30 min's had to go by until you could unlock it again?

Many thanks for any input.


Bill
 
Hi Bill, yes you can make such a timer and control it in the MDL file as well. What you need to take into account is that Local Vars are reinitialized to 0 after an AIRCRAFT_RELOAD, so you can't use one of these to hold the current visual state. BUT you can use any FS native var (A:type) that is not a part of your project and store the visual condition there,as Avars do retain their state after a reload.
Obviously, the timer will reinitialize when a flight resets or ends.
This would be the simpler approach; most complex ones might involve a registry key control _I've done this time ago for a payware project- but you would need a DLL to handle the process.

Regards,
Tom
 
Use my simple method. A large box in front of the plane.
But don't add a texture, so they can't add alpha and make it hide.

Just a big ugly green box.

I did this, but i decided I don't like to give out demo's because they get too
many actual files. So a friend could just replace the model.....

So I never give out demo's...until i know of a better method......
 
Hey DG,

What I am thinking is a main Hierarchy that the components of the plane are linked to, and in 5 or more min's, that part disappears, so the plane is suddenly gone.


Just trying to figure the code out for the part.
 
If you embed all of the logic in the .mdl file itself, it will time out after x minutes and can only be reset by reloading the model...

...after a few cycles of frustration, the user will give up.
 
If you embed all of the logic in the .mdl file itself, it will time out after x minutes and can only be reset by reloading the model...

...after a few cycles of frustration, the user will give up.


Thats exactly what I want. I was also thinking of having it require to be 'on the ground, at 'zero speed' in order to start the counter or the plane remains invisible.
 
Bill, just a hint that might be useful in your case:

If you plan to use an AVar, better if it is not a bool one but any that can receive numbers, and also doesn't have an "easy" key to be assigned via controls... menu. You should only make the actualizing event, which is saved in compiled code and cannot be read by editing the MDL. For the same reason, you should avoid any reference to the AVar in the .MDL as this CAN be read when editing the MDL.

Tom
 
i think you miss the point of what Bill was saying.
He was saying the plane will not handle the over coding call.
Plus that's too much work. At least my way it takes a few seconds
and no added lag. The user can test out all the switches, fly by auto pilot,
but never see the runway.....So they will want it.

Make the box say DEMO......But not texture on the main box......

Do this if your serious.....
 
Back
Top