Jump to content
Sign in to follow this  
Guest btrpilot

Pilot controlled lighting

Recommended Posts

Guest gorchi

Hi,Do I read it right, You want ot have frequency controlled animated hangar doors? Ehm, this is a little bit long and complex API... But yes, it can be done. Check once again the link I have written for SCASM tutorial by Andreas Klisch. There is complete addition You need, sometimes it needs to be customized.Otherwise, if You have just plain opening/closing, without rotation, then just create an API with closed doors. Then you need to animate those doors.The idea of animation is like this:- recreate timer based on variable 5FC, which itself is known as timer tick_18. You need to check last 8 bits, for maximum 256 steps (you can have also only 64 if You wish). Each value is stored in special variable- next create traps on this new timer; for every step create TransformCall, which will put the door at certain distance, like:step 0, door closed, dx = 0step 1, door little opened, dx =1step 2, door little opened, dx =2step 3, door little opened, dx =3...step 63, door fully opened, dx= max- then You will need some extra variables for frequency, for status of opening/closing doors.It's a bit complex but it gives user much much fun then :)Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites
Guest btrpilot

Hi Goran, That does sound a little too complex for me... How can I set up the code to show the hangar doors open after tuning a certain frequency in the nav2 or ADF and simply closed when the radios are tuned to another frequency? EOD has an "interactive elements" feature that basically is supposed to do the same thing, but it doesn't work in FS9. I'll try to create a simple macro of a hangar using the interactive elements feature and maybe you can check it out--see what the problem is.;)Thanks a lot for your help, I really appreciate it,Brandon

Share this post


Link to post
Share on other sites

Sure, post the code here, maybe we can see why it does not work anymore.


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites
Guest btrpilot

Hello,I guess your still on vacation Arno but maybe somebody else can help me out. Here is the code for my hangar, I also have a screenshot attached of EOD's "interactive elements" box to show you what I'm talking about. Group 2 is the hangar minus the door, group 3 is just the door in the closed position, and group 4 is of course the door in the open position. When I try it out the macro in FS, both groups 3 and 4 are displayed. Any ideas?Thanks for your help,Brandon

Share this post


Link to post
Share on other sites
Guest gorchi

Brandon,from the source You have attached I can't see any groups there. I don't see any suitable IfVarRange() switch so I can't really exactly tell You how help.Anyway, if You wish to have smooth animation, then You'll have some work to do. If You just want open/close at some frequency then it is just switch like this:IfVarRange( :close_door 7B0 0x1800 0x1800 ) ;var. 7C0 is for NAV1, 0x1800 is for 118.00 Call32( :draw_open_door ) Jump( :_skip ):close_doorCall32( :draw_closed_door ):_skipAgain, smooth animation is quite complex and www.combatflight.de ->tutorials ->SCASM tutorial, part2 holds the answer with all the explanation You need.Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites
Guest btrpilot

I didn't see any groups either. Does this mean I can't even do a simple open/close switch like you described?And if it is possible, where exactly do I place the switch?Thanks again,Brandon

Share this post


Link to post
Share on other sites
Guest gorchi

Hi Brandon!I don't know how EOD works these days. I used it 2 years ago and since then only FSDS. But if You manually tweak the code, then You can do it. Where to put it? I think best before those numerous TransformCalls(). I hope this code will work:http://forums.avsim.net/user_files/88768.txtAnd please TO ALL USERS POSTING CODE! PLEASE DO NAME THE OBJECTS IN CASE OF SUCH PROBLEMS - We can't smell which object is door, mechanism of door or whatever!!!Hope it helps,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites
Guest btrpilot

Aha! Its all starting to come together! I still have errors when I compile though, If you don't mind I'd like to continue this discusion on the www.scenerydesign.org website.Thanks,Brandon

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...