Jump to content
Sign in to follow this  
Guest gorchi

Dynamic vehicles in FS2004

Recommended Posts

Guest gorchi

Hi Pilotski!It seems I am a little bit back in time since I have so old version of fltRec :) I will download the newest version and check it out.Thanks a lot for the tip, how to translate recorded paths!! I will try to make it work; I don't need DOD to make complete dynamic scenery, I'd rather do it by hand, Oliver Pabst did probably the same in LEPA, EDDW, Emma Field and so on.I mentioned VARBASE in connection with static objects. You don't need it in dynamic library. For example, if You want to turn on and off follow me red lights, then You should do something like this (It works for me btw):Dynamic library:

; Draw Main ModelCall32( :000000 )Call32( :000001 )Call32( :000002 )....IfVarRange( :Ret 0030 1 1 );with this variable we turn on and off some lightsCall32( :000005 );Follow me light rightCall32( :000004 );Follow me light leftCall32( :000010 );Turn signal left frontCall32( :000011 );Turn signal right front:RetEndVersionReturn....; Part: Light.Beacon;Follow me light right:000005;IfVarAnd( :CNT3  5fc  8 )IfVarAnd( :CNT3  26  AAAA )Return:CNT3Transform_Mat(	8.160000 27.680000 -19.840000	1.000000 0.000000 0.000000	0.000000 1.000000 0.000000	0.000000 0.000000 1.000000	)Light( m 0 0.0 0.0 0.0 20 0.0 0.0 FF 255 0 0 0.0 0.0 0.0 )TransformEndReturn; Part: Light.Landing.1;front headlights:000006;IfVarAnd( :CNT4  28c  1 )IfVarAnd( :CNT4  24  0x0010 )Return:CNT4Transform_Mat(	-9.616000 12.000000 28.799999	1.000000 0.000000 0.000000	0.000000 0.788011 0.615662	0.000000 -0.615662 0.788011	)Light( m 5 0.0 0.0 0.0 20 0.0 0.0 FF 252 232 190 0.0 0.0 0.0 )TransformEndReturn

As You can see, timer variable 5fc was substituted with variable 26, while 28c was substituted with 24.In Dynamic scenery, I can turn off follow me lights (connection to variable 0030 in dynamic library) with SetColor( 0 00 00 ) or turn them on with SetColor( 0 01 00 ) If You check out SCASM onlie documentation, You'll know how I came up with these variables ( http://www.scasm.de/doc/sca_objl.htm#dopb ):0 object position, Lat Lon Alt 18 objects pitch, bank and heading data 24 object flags, see below 26 mirror of beacon counter often masked with hex values of 0x404 or 0x808 28 slow moving prop position, 16 bit pseudodegrees (rotating angle) 2A fast prop position 2C object radius in meters 2E textured aircraft flag 30 object color 0 ----> SetColor( 0 01 00 )32 object color 1 34 object color 2 36 object color 3 38 object color 4 3A object color 5 3C object color 6 3E object color 7 flags 0x0001 anti collision stopping disabled 0x0002 unused 0x0004 gear bit 0x0008 unused 0x0010 day 0x0020 dawn / dusk 0x0040 night 0x0080 unused 0x0F00 mask for density bits (0...4 valid) 0x1000 object is considered "other traffic" 0x2000 object is considered "service traffic" 0x4000 object is considered "ground aircraft traffic" 0x8000 object is considered "airborne aircraft traffic" And now everything else is easy :) I hope this will clearify some things and help You to make dynamic scenery as good as it is EDDW (or LEPA...) :DBest regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites
Guest Pilotski

Hallo again ! This is in fact how I do when I turn the lights on and off on my objects, but I think we misunderstood each other in the varbase-question. In my latest project, which is working now,I needed a way for two or more vehicles to "contact" each other. A file working like a dll where data from one object can reach another and vice versa. The only way, so far, for them to do this is to use a globaluserVar (312, which is the only one I had got to work). If I could use a Varbase instead, I though I could work this way without using a GlobalVar, but it was then I discovered that when the object "in a varbase" it can't reach the objectVars ( 26, 28, 30 aso )from the dynfile. So to speak, the command VarbaseOveride didn't work.Regards, PeterThe "latest project" site , http://www.flightsim.no/home/textureart/Peter/Peter.htm (This is unfortunately the only part on this site in enlish. I'm working on a translation for the other parts.)In this project I must turn off the FollowMecars not choosen, for not having them to show up when Nav1 freq:s is changed, and this is done by the GlobVar312, which was hard to find out how it worked !Another btw is that it was through another code snipet ( with the blinking lights )from you, I discovered how to use the ObjectVars !*********

Share this post


Link to post
Share on other sites
Guest gorchi

Hi Rhumba!Thanks for the tip; I know FSDyn, nice and easy software but the SCASM code it produces is the code, that I don't like. The path of an object is made from hundreds of lines MoveToPos1(). Many of them could be eliminated and substituted with MoveToPosN() but I don't know which. But more than that I would love to transform all those lines to something like this:

	MoveXY( 13 73 100 )Turn( 6 306 26 )MoveXY( 10 -84 63 )Turn( 5 36 20 )MoveXY( 1 3 4 )Turn( 1 80 8 )MoveXY( 5 55 9 )Hold( 4 )SetColor( 0 00 00 )MoveXY( 1 15 3 )Turn( 1 126 5 )StartTimerSetColor( 0 01 00 )MoveToPosN( 12 N46:13:49.1709 E014:27:24.1195 385 0 0.0 126.0 )Turn( 1 36 4 )Turn( 1 306 5 )MoveXY( 1 -8 6 )

Compare above with hundred lines of MoveToPos1() - I have much more control with above lines than with MoveToPos1() instructions. And an observer, who will look at the object, will quite soon distinguish object driving the path made with MoveToPos1() or with above code - just look at the turns. With Pilotski's tip, it might be very possible to use DOD conversion feature to get the code above.Anyway thanks both for the help!Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

Hi Goran.I think I understand the problem, now.FLTRec records positions at timed intervals, and those may be causing the code you don't like. If you find an easy method, let us know. :)In regards to Christian's original post:The new FS9 MakeMDL makes no allowance for creating Dynamic Objects, and Gmax's animation limitations severely restricts movement. FS10?Meanwhile, the old Dynamic scenery works OK. I'm not sure if the old limitations as to the number of objects per BGL, etc... apply anymore.Dick

Share this post


Link to post
Share on other sites
Guest luissa

>Hi Luis!>Have You animated dynamic scenery objects by hand or by using>some software like DOD? I tried to make it using FSSC and>lines (it gave me coordinates) but it didn't work good. So far>I made dynamic scenery more or less by hand and it took me a>lot of time. Any suggestions how to make it easier?>>Best regards,>Goran Brumen>FS Slovenija 2002 team>http://slovenia.avsim.netHello Goran,I just read your post. Yes, I do paths by hand in SCASM. I use FSDS to make a polygon (perpendicular to Z) with vertices on the the path of the dynamic object. Then I set the scale to 1 meter. Then export the polygon and just pick the list of points to buid the paths from them.Regards, Luis

Share this post


Link to post
Share on other sites
Guest gorchi

Hi Louis!Many thanks for Your tip! I guess You do export in old FS2000 style commands? I have never thought making dynamic scenery this way and it might be well worth trying. Many thanks and best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

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