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

Problem with dynamic car

Messages
187
Country
hungary
Hello,

would like to make a car follow a path but if a plane crossing its way the car have to stop. After the plane leaved the area the car continue the path. My car unfortunately always stops and it doesnt matter where my plane is, and never start to move again. Why?

Code:
...

MoveToPosN( 1 47.43340032 19.26379022  151.09613030303 0 0 311.84973 )
:TESTPOINT
MonitorPos( 47.43343905 19.26372639 5 :GONEXT)
Hold(2)
jump(:TESTPOINT)
:GONEXT
MoveToPosN( 1 47.43343905 19.26372639  151.185821212121 0 0 311.81377 )

...
 
Peter said:
Hi !

You have to use "StartTimer" when using MoveToPos.

Cheers, Peter


Here is my code but the car stops and never move on :( I tried when the StartTime is before the SetPos command, etc but dont work.

Code:
...
LatRef( 47.43405 )
    
	CallDLibObj( :DYN01 3 3 00C2CDA9 A9E100AA 596711D0 B1A18307  )
Exit

:DYN01   ;

SetPos( 47.4330891600121 19.2643156596371 151.09  )
Heading( 308 )
ACS( 1 )  ; crash control= OFF
Hold ( 5 )

StartTimer
MoveToPosN( 1 47.43313522 19.26423559  151.166993939394 0 0 310.66234 )
MoveToPosN( 1 47.43315958 19.26419380  151.157572727273 0 0 310.81236 )
MoveToPosN( 1 47.43318914 19.26414319  151.100545454545 0 0 311.08376 )
MoveToPosN( 1 47.43322040 19.26408999  151.18666969697 0 0 311.37479 )
MoveToPosN( 1 47.43325492 19.26403173  151.094066666667 0 0 311.58654 )
MoveToPosN( 1 47.43328972 19.26397355  151.184181818182 0 0 311.64082 )
MoveToPosN( 1 47.43332551 19.26391411  151.097951515152 0 0 311.73155 )
MoveToPosN( 1 47.43336234 19.26385297  151.183378787879 0 0 311.81101 )
MoveToPosN( 1 47.43340032 19.26379022  151.09613030303 0 0 311.84973 )
:TESTPOINT
MonitorPos( 47.43343905 19.26372639 5 :GONEXT)
Hold(2)
jump(:TESTPOINT)
:GONEXT
MoveToPosN( 1 47.43343905 19.26372639  151.185821212121 0 0 311.81377 )
MoveToPosN( 1 47.43347869 19.26366095  151.097509090909 0 0 311.79132 )
MoveToPosN( 1 47.43351550 19.26360030  151.182893939394 0 0 311.75852 )
MoveToPosN( 1 47.43355076 19.26354208  151.096312121212 0 0 311.74976 )
MoveToPosN( 1 47.43358488 19.26348559  151.186003030303 0 0 311.35136 )
MoveToPosN( 1 47.43361749 19.26343145  151.095660606061 0 0 308.85476 )
MoveToPosN( 1 47.43364889 19.26337675  151.177081818182 0 0 307.44360 )
MoveToPosN( 1 47.43367676 19.26332493  151.12233030303 0 0 306.89190 )
MoveToPosN( 1 47.43370411 19.26327194  151.1404 0 0 306.68981 )
MoveToPosN( 1 47.43372956 19.26322180  151.139775757576 0 0 307.38131 )
MoveToPosN( 1 47.43375533 19.26317138  151.139790909091 0 0 309.04883 )
MoveToPosN( 1 47.43378128 19.26312257  151.139790909091 0 0 310.05365 )
MoveToPosN( 1 47.43380763 19.26307524  151.139715151515 0 0 310.37651 )
MoveToPosN( 1 47.43383311 19.26303067  151.13966969697 0 0 310.90977 )
MoveToPosN( 1 47.43385994 19.26298448  151.1397 0 0 311.57175 )
MoveToPosN( 1 47.43388759 19.26293786  151.139715151515 0 0 312.41676 )
 
Hi again !

A few glasses of vine later, test with MonitorRwy instead of MonitorPos.
I know though, that this command can from time to time hang, don't know why. Solution; change the pos a little.

More cheers, Peter
 
Hmm.. okay. I confirm the MonitorRwy works :) And a last question today: how the program recognize that the plane is within the monitored box or runway? It compare the referenc point of the aircraft or if any point of the aircaft is within the box the command activated?
 
Back
Top