SCASM 2.88 |
FS5 - FS2002 - dynamic scenery commands |
Most of this document is based on experiments with FS5.0 and so it might happen that some instruction do not work as expected in newer FS versions.
I've ben often asked how to increase the visibility distance of the FS5 dynamic objects.
It seems the maximum visibility distance is "hard coded" in the FS5 internal
object definition and cannot be changed by any command.
But FS98 and FS2000 uses dynamic objects defined as library objects (file DYNLIB.BGL) and
it is possible now to experiment with self made dynamic objects. See CallDLibObj() in this
document and the file sca_objl.htm for more information.
The use of D##() expert commands such as Dbx(05) is allowed in the dynamic scenery area.
TOP |
FS5 - FS2002 |
Area15( maxlat minlat maxlon minlon [&] ) Area15( maxlat minlat maxlon minlon [maxlat2 minlat2 maxlon2 minlon2] ) |
This defines an area for the dynamic scenery section. All commands for this section have
to appear within According to the FS2000 scenery SDK the second boundary MUST be larger than the first one. There are also some limitations with dynamic sceneries:
|
TOP |
FS5 - FS2002 |
End15 |
This command marks the end of an section 15 area block and tells SCASM to do some clean ups and calculate the jump distances. |
TOP |
FS5 - FS2002 |
LatRef( lat ) |
This command defines a reference latitude which should be the center latitude of your
Area15() scenery block. It should also be the first command in an Area15().
The reference latitude is needed for the correct scaling in east-west direction. |
TOP |
FS5 - FS2002 |
Pattern( :Label objectcode traffic_flags mindense ) |
This command defines an object pattern. It seems these instruction also defines an
internal control block for every object. So this is probably something like a object
(or pattern) control block. If you want to awaken a sleeping process you have to refere
to this instruction. (a :Label just in front of this Pattern() )
|
TOP |
FS5 - FS2002 |
Exit |
This marks the end of the pattern definition table or the end of dynamic scenery initialisation. |
TOP |
FS5 - FS2002 |
SetColor( number colorcode attr ) |
Sets the color of some parts of the selected object. Atention, it was reported that some
color codes (high numbers) can cause crashes in FS95 !
Table of FS5 object details:
|
TOP |
FS5 - FS2002 |
SetPos( Lat Lon alt ) |
Sets the position of an object
|
TOP |
FS5 - FS2002 |
Heading( degrees ) |
Sets the heading of an object |
TOP |
FS5 - FS2002 |
Sleep |
Stops any action of this object (pattern process) until it is reactivated (->Awaken ) by an other pattern process. Be very carefull with this command. Misplaced Sleep instructions may crash FS5. Never use this as the last instruction. If in doubt place a jump after the sleep even if you never Awaken() this object. |
TOP |
FS5 - FS2002 |
Awaken( :Label ) |
Reactivates the addressed pattern process. You have to address a label at the
required pattern definition entry. Do not try to Awaken() non sleeping objects.
Do not place a Sleep() command immediately after this one. This can loock up all
dynamics. If your scenery does not need more movements at this point use at
least a |
TOP |
FS5 - FS2002 |
Hold( time ) |
Stops the action of this object for 'time' (integer value) seconds. No Awaken command is needed. I havn't seen any value greater than 255 in original scenerys but it seems that in FS98 larger values will work. |
TOP |
FS5 - FS2002 |
Gear( up | down | number ) |
Moves the gear up or down. |
TOP |
FS5 - FS2002 |
Turn( time heading rad ) |
|
TOP |
FS5 - FS2002 |
Jump( :Label ) |
The programm execution is continued at :Label. |
TOP |
FS5 - FS2002 |
If..( :Label var dezval ) |
The following four commands are conditional jumps. The content of the variable
"var" is compared to "dezval".
|
TOP |
FS5 - FS2002 |
Ifeq( :Label var dezval ) Jump2B( :Label var dezval ) |
Execute the following commands if the content of var is equal to dezval, otherwise jump. |
TOP |
FS5 - FS2002 |
Ifne( :Label var dezval ) Jump2C( :Label var dezval ) |
Execute the following commands if the content of var is not equal to dezval, otherwise jump. |
TOP |
FS5 - FS2002 |
Iflt( :Label var dezval ) Jump2D( :Label var dezval ) |
Execute the following commands if the content of var is less than dezval, otherwise jump. |
TOP |
FS5 - FS2002 |
Ifgt( :Label var dezval ) Jump2E( :Label var dezval ) |
Execute the following commands if the content of var is greater than dezval, otherwise jump. |
TOP |
FS5 - FS2002 |
Call( :Label ) |
The subroutine at :Label is called. Programm execution is continued there until a
Return command appears. The Return command in the subroutine causes the programm to continue
with the next command following the Call() instruction. |
TOP |
FS5 - FS2002 |
Return |
The programm execution is continued with the instruction immediately following the Call()which calls this subroutine. |
TOP |
FS5 - FS2002 |
PitchTo( angle speed ) |
|
TOP |
FS5 - FS2002 |
BankTo( angle speed ) |
|
TOP |
FS5 - FS2002 |
YawTo( heading speed ) |
|
TOP |
FS5 - FS2002 |
MoveX( time dist ) |
|
TOP |
FS5 - FS2002 |
MoveY( time dist ) |
|
TOP |
FS5 - FS2002 |
MoveZ( time dist ) |
|
TOP |
FS5 - FS2002 |
MoveXY( time X_dist Y_dist ) MoveXZ( time X_dist Z_dist ) MoveZY( time Z_dist Y_dist ) Move3D( time X_dist Z_dist Y_dist ) |
|
TOP |
FS5 - FS2002 |
AccelerateX( time rate X_dist ) AccelerateY( time rate Y_dist ) AccelerateZ( time rate Z_dist ) AccelerateXY( time rate X_dist Y_dist ) AccelerateXZ( time rate X_dist Z_dist ) AccelerateZY( time rate Z_dist Y_dist ) Accelerate3D( time rate X_dist Z_dist Y_dist ) |
|
TOP |
Dynamic Scenery Instructions for FS98 / FS2000 +
2.12 | FS98 - FS2002 |
StartTimer |
This command must be used just before the first |
TOP |
2.12 | FS98 - FS2002 |
MoveToPos1( Lat Lon elev pitch bank heading ) |
This command moves the dynamic object from its current position to this new position within 1 second.
|
TOP |
FS98 - FS2002 |
MoveToPos5( Lat Lon elev pitch bank heading ) |
This command moves the dynamic object from its current position to this new position within 5 seconds. |
TOP |
2.50 | FS98 - FS2002 |
MoveToPosN( time Lat Lon elev pitch bank heading ) |
This command moves the dynamic object from its current position to this new position within N = time seconds.
|
TOP |
FS98 - FS2002 |
TaxiTo( Lat Lon elev heading ) |
This cammand moves the dynamic object in a smooth curve and with an slow speed to this
final parking position. Usually this position is identical to that one defined in the
|
TOP |
FS98 - FS2002 |
MonitorRwy( :Label Lat Lon elev hdg len wid ) IfObjectInBox( :Label Lat Lon elev hdg len wid ) |
The specified area is monitored. If no other aircraft is in this area a jump to :Label is performed. This command is usually used to check if the runway is free.
Example:
|
TOP |
FS98 - FS2002 |
MonitorPos( Lat Lon rad :Label val2 ) RefuelBounds( Lat Lon rad :Label val2 ) |
This specific spot is monitored. If your aircraft is not there a jump to :Label is performed. See also the Refuel() command.
|
TOP |
FS98 - FS2002 |
Refuel( rate ) |
Move a fuel truck to a position near your aircraft refuling point and then use this command. The fuel truck then moves to a position in front of your aircraft, stops if your tank is not full, and then continues a circle back to the initial position of this command. This command is often found together with MonitorPos().
Example:
|
TOP |
FS98 - FS2002 |
ACS( s ) Dbx( 42 s ) |
The new FS98 dynamic objects has an Anti Collision System. For some purposes this system can be switched off. In the default scenery this ACS is usually switched off after an take off of an aircraft and it is usually enabled again just before touch down or lowering the gear. Usually it is also switched off for service trucks just before the TaxiTo() command is used to put them back to the parking area. If 2 dynamic objects come too close together with ACS on the whole dynamic scenery can change to an 'static' scenery. The default for ACS seem to be permanently ON (if not generally disabled from the menu system). Maybe ASC OFF will result in a higher frame rate. The original name in the SDK is ANTI_COLLISION_OFF with parameters TRUE or FALSE.
|
TOP |
FS98 - FS2002 |
CallDLibObj( :Label X Y id0 id1 id2 id3 ) CallDLibObj( :Label X Y "object description" ) |
This command activates an dynamic object from a library file and passes some FS internal
parameters to it. It can be used as a replacement of the Pattern() command.
The following ID parameters are examples from the FS98 default dynamic object library named
DYNLIB.BGL. If the scenery is for FS98 or later and if you use SCASM 2.32 or later, it is possible
to select the dynamic objects by their text description. Just replace the id0 to id3 values
by the text surounded by quotation marks. The ID's are 32 bit hex numbers. These are used to specify the library file and the wanted object in this file The following ID's are used in FS98 DYNLIB.BGL:
|
TOP |
FS98 - FS2002 |
LandingAbort( Lat Lon elev flag v hdg len wid ) D_40( Lat Lon elev flag v hdg len wid ) |
This command will test the runway area defined by hdg/len/wid for other objects and
will enter an traffic pattern if this area is occupied. The runway area is checked again
after the pattern is finished.
Example:
|
TOP |
For the variables used in FS98 / FS2000 dynamic scenery library objects please see "Dynamic object parameter block" at the end of OBJLIBS.DOC.
This is a minimal FS5.0 dynamic scenery file:
|
TOP | © Manfred Moldenhauer |