Sign in to follow this  
Guest

Triggering Dynamic Scenery - help needed

Recommended Posts

Is it possible to activate dynamic scenery with NAV2 radio freqs.? If Yes, then how?

Share this post


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

Yes this is possible, as a matter of fact I am working on a project with frequency controlled animation. You can get better info in the Scenery design forum next door.in the mean time check the great tutorial herehttp://home.wanadoo.nl/arno.gerretsen/

Share this post


Link to post
Share on other sites

Hi,I trigger dynamic "Follow Me car" action when an aircraft passes a sequence of positions. I use the IfObjectInBox() instruction. I do not know if the nav frequency is available under the "If..( :Label var dezval )". I also would like to know what variables (and their addresses) one can access in section 15. Anybody knows?Regards, Luis

Share this post


Link to post
Share on other sites

It should somehow be possible to trigger them with command looking something like this: IfVarRange( :MoveFir 07C2 2384 2384 )Jump( :HoldFir )but FS crashes if I try to use it.

Share this post


Link to post
Share on other sites

Yes, I think the dynamic scenery only has a limited amount of variables (there are a few listed in the SCASM docs and even some of them crash Fs2002). And don't think others then the SCASM docs are supported.I have never made a frequency controlled scenery with the old dynamic commands, so I am afraid I can't help much for the rest with that.If you try to use the same sort of commands as GMax does I might be able to help, or you could have a look at BusyObjects.Arno


Member Netherlands 2000 Scenery Team[link:home.wanadoo.nl/arno.gerretsen]Arno's FlightSim World for scenery design hints, tips and other tricks...

Share this post


Link to post
Share on other sites

>It should somehow be possible to trigger them with command >looking something like this: >>IfVarRange( :MoveFir 07C2 2384 2384 ) >Jump( :HoldFir ) >>but FS crashes if I try to use it. Hi,IfVarRange is not allowed inside a section 15 block. So the crash! Only the following conditional branches are allowed:IfEQ( :Label var dezval )Jump2C( :Label var dezval )IfNE( :Label var dezval )Jump2D( :Label var dezval )IfLT( :Label var dezval )Jump2E( :Label var dezval )IfGT( :Label var dezval )The problem is that only a few "var" addresses have been reported. I did not check the SDK F2000 scenerey to see if more addresses are given in addition to the ones Manfred states in his SCASM doc.With BGLAnalyse and a BGL file that you know to have such dynamic scenery, you can discover if the variable you need is used and, if so, how it is used. If you discover something, please post here.Regards, Luis

Share this post


Link to post
Share on other sites

Hi,More on this. Variables like "dynamic scenery complexity", "wind direction", "time of day", ... , can be accessed in section 15 code and trigger dynamic scenery. For example:...:wait_for_12amHold( 5 )Ifeq( :wait_for_12am 7 720 )...will check every 5 seconds if "time of day in minutes" is 720 and will not continue until we reach 12 o'clock. SCASM lists 8 variables, 0 up to 7, the one in the example being 7.Dynamic scenery envolves the definition of the patterns or movements (what is called the section 15 of a BGL file) and the objects that you want to animate. These objects are similar to "normal" library objects and are placed in section 10 of a BGL file. The difference between a "normal" library object and a "dynamic" object resides in the starting code of the library object. Here is an example:ObjID( CB5F5BCF 267300F3 022E0DB1 C0F65F5C )LibObj( PWR 100 SIZE 0 SCALE 1024.000 TYPE 2 NAME "Follow_Me_Car" ) RefPoint( ofs :return 0 0 0000 ) SuperScale( :return 2048 15000 10 ) PBHCall( :draw_object 0018 ) SetVar( 002C 2 ):return Return:draw_object Low64k2Var( 003C 033B )The lat/lon/alt triplet of the RefPoint is in variable 0 (or better saying: in 3 consecutive variables of 6 bytes each starting at address 0 containing lat lon and alt). The "pattern" code calls the library object and the object gets placed in whatever position is definied in variables 0 up to 17. It is therefore the responsability of the calling part, to set this position before the calling the drawing routine. Also the pitch bank and heading variables, (starting at address 18 and going up to 23) need to be asserted before the calling - see the PBHCall()! So, when in section 10, the variables that you can access are very specific. They are listed in SCASM docs. Variables 30 to 3E are called colors and represent a way to pass information from the "pattern" code to the "library" code. In section 15 you may use:Set( 0 BB )such that BB is placed in variable or color 0. You can test this variable in the library with:IfVarAnd( :go_here 30 FF )noting that color 0 is read as variable 30; 1 as 32 ; and so on.If you want to test (read) another variable you need to copy it to this dynamic block of variables. In the above example I had the necessity of reading variable 33B (distance to the viewer). As I was not using color 6 (variable 3C) I copied the global variable 33B to 3C. Then in the library code I can test the state of variable 33B as 3C. If I tried to read directly 33B I was making a mistake.In conclusion: your nav frequency variable can be used inside the "library". For example, you can ajust the dimensions of the object, by reading that variable (as I explained) and chosing a list of Point()s based on the value of the variable. However I do not know how you can access it inside section 15 and use it to trigger the action.Regards, Luis

Share this post


Link to post
Share on other sites

BTW, does anybody have a list of animation posibilities with gmax escenery?

Share this post


Link to post
Share on other sites

How do you mean that? You mean the things you can trigger? In that case it is any variable that the scenery can access (so the list from the Fs2000 SDK (and also some that are only in the Fs98 SDK).Arno


Member Netherlands 2000 Scenery Team[link:home.wanadoo.nl/arno.gerretsen]Arno's FlightSim World for scenery design hints, tips and other tricks...

Share this post


Link to post
Share on other sites

Hi, yes , I'm going to look in the SDK. But in the mean time, and just for teasing a little bit, apart from "fixed" rotation and translation movements, can I, for example, make a fuel car go and get close to me and fancy things like that?

Share this post


Link to post
Share on other sites

Yes, if you give it a certain track that will let it drive in front of your parking position or so. But then it is still a fixedd translation :).If you want to let the track depend on your position it is a bit more difficult I guess (haven't tried that).Arno


Member Netherlands 2000 Scenery Team[link:home.wanadoo.nl/arno.gerretsen]Arno's FlightSim World for scenery design hints, tips and other tricks...

Share this post


Link to post
Share on other sites

Hi Gabriel.Your task would require that the position and heading of the (user) aircraft can be accessed as FS variables - first of all you need to know where to move to ;-)I am not too sure about Dynamic Sceneries, but in "normal" sceneries these variable don't exist (at least I don't know about them). Therefore it is quite a tricky job to find out where the (user) aircraft is. The best method I've developed until now limits the resolution to around 1 meter (which is awful lot if you want to dock to an aircraft), but there seems no method at all to determine the heading (orientation) of the a/c - so at least the orientation needs to be known in advance.Even if that problem is solved, creating "self-adjusting" animations for the object (it needs to move smoothly to different positions defined at runtime) is probably not feasible in dynamic sceneries.Regards,Bernd

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