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

Dynamic Scenery HELP!

New problem. Would like if the bus only moves if i set the nav1 frequency to 119.00. But the bus always move.

Code:
...
SetPos( 47.43366530 19.26712081 151.111254545455  )
Heading( 221.84924 )
ACS( 1 )  ; crash control= OFF
Hold ( 5 )

:dontmove
hold(1)
IfVarRange( :dontmove 7BE 0x1900 0x1900)


MoveToPosN( 1 47.43366530 19.26712081  151.111254545455 0 0 221.84924 )
MoveToPosN( 1 47.43366528 19.26712079  151.111254545455 0 0 221.84991 )
MoveToPosN( 1 47.43366521 19.26712071  151.112681818182 0 0 221.84649 )
MoveToPosN( 1 47.43366512 19.26712058  151.112681818182 0 0 221.84429 )
...
 
Sorry to say but the command "IfVarRange" and similar are not valid in the dynfile, only in the object/libfile. What you are trying to do is feasable though in another way and it's a little more complicated. It takes a tutorial to describe, maybe I have that time later on. You have to use an (invisible )obstacle and manouvre it's crashcontrol, Acs with the frequency.

Regards, Peter
 
Hello again,

new problem. When i successfully made a bus with full path its ok. But now, i'm trying to create more dynamic objects. I used the same technic, so now i have 4 files. One is the bus library, on for a car library and two other file which are control their movements. The problem is that only the last dynamic object visible in fs. If i delete the car, the bus works ok, if i put the car and the bus files together into the scenery folder only the car will be visible and so on.
 
I tried to use one library file without result. I'm thinking about one movement file as well but it seems to me impossible.
 
Hallo !

I don't know if I got you right, but you can't have two dyn/controlfiles for the same area. If you have two, or more, for the same area they are loaded in alphabetical order. But if they have their centerpoints slightly away from each other and the same size of the activity area, the file with nereast to you/user will be loaded. The objectsfiles though, you can have as many ( !?)as you want.

Cheers, Peter
 
Okay but in this case how can place for example 20 cars which are moveing around my airport or on the roads etc? I can put all my dynamic object into 1 library files but how can write all of the objects movement code into one file? Is it good if i place more area15 command into one file? Or how?
 
You have to place all the movements in one file! Maximum size is 64kB so you have to write effective code :) The header part shall look something like this ;

CopyRight( [DOD3.0]Scenery made by the master ! )
Set( Area15mx 64 ) <------------Changed from 32 which is default in DOD, to 64
Header( 1 N59:29:41 N59:24:18 E017:48:18 E017:37:41 )
LatRange.............

Then comes the object assigning part ;

CallDLibObj( :Object1 3 4 DD0000B0 CCCCCCCC FA000000 00EF0010 )
CallDLibObj( :Object2 3 4 DD0000B0 CCCCCCCC FA000000 00EF0011 )
CallDLibObj( :Object3 3 4 DD0000B0 CCCCCCCC FA000000 00EF0012 )
CallDLibObj( :Object4 3 4 DD0000B0 CCCCCCCC FA000000 00EF0013 )
CallDLibObj( :Object5 3 4 DD0000B0 CCCCCCCC FA000000 00EF0014 )
.......................
Exit

Then the commands for each of the objects ;

:Object1
SetPos( ......... )
Heading( ......... )
ACS( 1 ) ; crash control= OFF
Call (:Pattern1 ) ; Can placed elsewhere in this file.
Jump(:Object1)

:Object2
.........
:Pattern1
MoveToPos1 (......
........
End15

If you will use different cars driving the same pattern it's no problem and this can save a lot of code.

Cheers, Peter
 
Don't work. Both objects are appear in FS but only the Car1 moves. After it reaches the last MovetoposN command the FS doesnt respond anymore.

the code:

Code:
Set( Area15mx 32 )
Header( 1  47.45510608675  47.4130741674143  19.2040432916463   19.3030279346017  )
LatRange( 47.4130741674143 47.45510608675 )

; Dynamic Scenery section
Area15(  47.45510608675  47.4130741674143  19.2040432916463   19.3030279346017 )
LatRef( 47.43405 )
    
	CallDLibObj( :Car1 3 4 E8CDB246 4BFE9406 292F289A D971500B  )
	CallDLibObj( :Neoplan 3 4 8C650EDD 428ECADC A25D1196 701B9F74  )


Exit


:Car1
SetPos( 47.43298161 19.26239222 151.136272727273  )
Heading( 320.04589 )
ACS( 1 )  ; crash control= OFF
Hold ( 1 )
call(:Pattern1)
jump(:car1)

:Neoplan
SetPos( 47.43366530 19.26712081 151.111254545455  )
Heading( 221.84924 )
ACS( 1 )  ; crash control= OFF
Hold ( 1 )
call(:Pattern2)
jump(:Neoplan)

:Pattern1
MoveToPosN( 1 47.43298161 19.26239222  151.136272727273 0 0 320.04589 )
...
MoveToPosN( 2 47.43298161 19.26239222  151.136272727273 0 0 320.04589 )
Jump( :Pattern1 )

:Pattern2
MoveToPosN( 1 47.43366530 19.26712081  151.111254545455 0 0 221.84924 )
...
MoveToPosN( 5 47.43366530 19.26712081  151.093445454545 0 0 228.0 )
jump (:Pattern2)
	  
End15
 
Hi!

Hmm, I didn't code Section15 scenery for some time, but I think you should replace the Jump( :Pattern1 ) and Jump( :Pattern2 ) instructions with a Return, because you called your movement code above.
Looks like the infinite loop enclosing your MoveTo.. commands is freezing up your FS.

Hope it works!
-Jeff
 
The code is being executed sequentially, so it calls car1 first then neoplan..but because of the infinite loop in the car1's pattern, it won't ever call your neoplan library-object and thus it doesn't show up at all. Well that's my theory :scratchch

-Jeff
 
Well thats nice and good :) but in this case how can i place more dynamic objects? Peter said (and i tried as well) that only one 'movement' controller file is allowed. Its ture. I also tried to put the dynamic objects and the controller files in different scenery folder but the same area (around the airport). Only one object is visible. Its a bit strange that i can make just one dynamic object / scenery :) Help please!
 
Where i have to put the StartTimer exactly? I tried to put after the library call commands so after the 'Exit' command and i also tried before the MoveToPosN commands. Nothing changed. Only the car1 moves and when reaches the last point the FS crashed.
 
Hi !

After more carefully studying the code I see that you have a jump from a function ( :Pattern1 ) to a function ( :Pattern1 ) and the same procedure with the other object. I don't think this will work in section 15 coding. If you want a repetition, you have to first out of the function like in the end of the pattern part ;
Jump (:Neoplan )
then it will repeats for you.

Cheers, Peter
 
Don't work, FS crashed. I cannot realize how to make more dynamic objects which are moveing at the same time :(

Edited:
the result was the same as i described above.
 
Sorry to hear. Send me the code and I can see what's wrong and perhaps fix it for you.

Cheers, Peter
 
So then,

I looked at your code and compiled it, but there were several errors...
Ok, first of all, you should enlarge your Area15 buffer in the first line of code to a value of 64KB: Set( Area15mx 64 )

Then, some of your MoveToPos points were out of your defined Area boundary, so I had to enlarge it a bit.

At the end of the :Pattern1 block, you have to use Return. You have called it from :Car1, so you want to return up there somehow..

For each of your pattern definitions, you have to use a new StartTimer command at the beginning.

There's also a limitation of the address range which a Call() or Jump() command can access, so be careful of too large pattern definitions. In your case, the Call(:Pattern2) couldn't access the start label :Pattern2 because it was "more than 32KB away".
I corrected this by moving the :Pattern2 block "up". So :Pattern2 is before :Pattern1, because Pattern1 is bigger than 32KB. So keep :Pattern1 at the last position.
If you want to add more objects later, keep in mind not to make too long recordings. You might consider to enlarge your recording interval for example to reduce data.


To make a long story short, I attached the corrected file so you can check it out yourself. It works! :D

Just ask again, if there are questions.

-Jeff
 

Attachments

Last edited:
Nice work Jeffrey ! The command "Set ( Logfile 1 )" is highly recommended when handwriting the code. It creates the logfile and can be very helpful to see what went wrong.

Cheers, Peter
 
Back
Top