Sign in to follow this  
Guest gorchi

Dynamic vehicles in FS2004

Recommended Posts

Anyone done any research in howto use predefined vehicle library objects and animate them in FS2004? Is this possible easily?I'd like to add a few sailing ships that actually move on predefined paths...Cheers, Christian

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Christian,I've got ships to move as AI on predefined "taxiways" (requires AFCAD2 overlays), which allows for effects to be attached to the vessels. Alternatively, I believe that the "old" dynamic objects still work in FS9. Richard McMaster has pulled together all the relevant utilities and a few examples and uploaded the package as "dynamic.zip". As far as I know it's available at flightsim.com only.Cheers, HolgerP.S.: if you do a seacrh for "dynamic objects" in the Avsim file library you might find examples and utilities.

Share this post


Link to post
Share on other sites

Thanks, HolgerIf you use ships as AI (I knew about that solution already), don't they make radio calls and clog up CPU time because the agents have to coordinate all those ships? Not an ideal solution.Good news that the old opcodes still work, I assumed they wouldn't as MS got rid of all of the old files. They have even redone the vehicles as new FS2002 mdl objects. I had a look over the default scenery and found some areas where vehicles are used in FS2004. They are all static. I may go with that, not ideal, but proper dynamic support will probably come for FS2006 at the earliest. An alternative would be programing paths as new library objects in gmax, but for now I'll leave that...Thanks for the help anyway...Cheers, Christian

Share this post


Link to post
Share on other sites

The GMax animations are indeed also an option, but you have 1024 frames at maximum (which is almost 1 minute of time). So not enough for big movements. But it can be used for small movements of course. I remember a scenery where they had a sailboat that moved in small circles, just to let it not be static.And for the AI, the radios are a good point, need to check that (one of our Dutch scenery team member just came with some AI ships). I don't think the performance is a problem. The user can disable them easily by adjusting the amount of traffic.

Share this post


Link to post
Share on other sites

i did a try of AI ship following Holger's way , but they were contacting the APP or lower ATC sector to request startup :-), so it was fun that a ship had priority on you in ATC communication.alex

Share this post


Link to post
Share on other sites

Howdy,that is an interesting point about the communication attempts of AI ships but doesn't the fact whether you hear them or not depend on the frequencies you choose (if any) for the AFCAD AI ship overlay? In other word, you would have to tune into the AI ship frequency via the "nearest airport" ATC list to hear them. Or is there some general frequency they will use I'm not aware of?Cheers, Holger

Share this post


Link to post
Share on other sites

Hallo ! Since Fs5, with a smaller update in FS98, the oldfashioned animation technic called "dynamic scenery" still works fine !You can use Fltrec for recording patterns, DOD for collecting data, and notepad to edit, and scasm for compiling. With some basic scasm knowledge you can create libraryobjects from FSDS/EOD api:s and even from decompiled Gmax-bgl's (!?) and with more scasm knowledge you you can add features to your objects. I'm adding diffent type of lights to mine and turns them on and of by the dynfile. And a lot more...Regards, Peter Here you can see some pictures from a project in progress;http://www.flightsim.no/home/textureart/Peter/Peter.htm

Share this post


Link to post
Share on other sites

yes, i've experencied hearing them on APP freq during landing too!then watching the ship's facilities in the nearby airport list isnt' so good. Maybe an hidden afcad should be the max! If you are interest our group developed a large group of both cargo and passenger ships ( ferries too). We started develpoing this project, then for these reason we left.Contact me if you're interesteda.savarese@isdproject.comalex

Share this post


Link to post
Share on other sites

Hey Peter,I checked out your site. This is very cool. I can't wait to see this in action.Matthias

Share this post


Link to post
Share on other sites

I asked our team member who made the AI ships and he said he just hadn't added any frequencies to the airport/seaport and therefore you don't hear the ships talking. But I still need to check that by loading the files he made in FS :D.

Share this post


Link to post
Share on other sites

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 BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

Hallo Goran ! I suggest FltRec and DOD. Then you can edit the code as you prefer and depending on your scasmskills ( which is not small! ) and I think this way it goes pretty fast to make a medium airport "alive". There are Fltrec for every versions of FS.Good Luck ! PeterBtw, thank you again for the animatedflag code. It make me understand the 5fc-clock and it have been very useful in my latest project.

Share this post


Link to post
Share on other sites

Hi Pilotski!Do YOu know how should I configure fltrec to be DOD compatible? I have version 8.x.. (hmm, I don't remember exactly) and I know it has some possibilities. And the next thing, I hope DOD will convert those coordinates to normal SCASM commands - MoveTo, MoveBy, MoveXY, Turn etc. Otherwise it doesn't make sense. Using these commands I can control acceleration, decceleration, speed, objects can make nice turns and so on.Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.netP.S: It's nice to hear it worked for You. My animated flag was realy tricky and using VARBASE in SCASM is still a dark hole for me (not completely black but dark grey :) )

Share this post


Link to post
Share on other sites

Hallo ! The versionnumber for FltRec for Fs2004 is 9.0 and it's downloadable from ; http://www.avsim.com/hangar/utils/nav/. If you record with Fltrec you have all the accelerations, movements aso. In Dod there is a "Draw and translate" funtion but I never got it to work nowadays but this function can do what you are surching for.It worked before on my old system so I think there can be some problems with the cooperation XP/DOD, but I don't know.But it's not so hard to edit the recorded path's in notepad. You can always use the commands ; "MoveToPos5" or "MoveToPosN" ( followed by the amount of seconds, up to 60 works fine) if you want smaller dynfiles. The maximum is 64 kB in the dyn-file(?). Maybe I should mail Rafael Garcia Sanchez and encourage him to update the sofware. I know there is a newer program out there which does almost the same, forgotten it's name, but it also work only with the default libraryobjects and that's a limitation. About the "Varbase" command I have tried it but I could never reach the objectVariables from within the varbase, which I have to, to be able to turn lights and other features on or off from the dyn-file. Though, If I got time I will test it more because I want a possibility for the objects to "know" each other, and I think this maybe is possible by the Varbase to avoid using a global userVar. O. Pabst have in the latest version of EDDW used the Varbase for this purpose I think. Cheers, Peter

Share this post


Link to post
Share on other sites

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

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

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

>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

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