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

SCASM RefPoint( ind

Messages
180
Country
us-california
Hey all,

I've recently discovered the fun of using SCASM (let's see...only about 10 years late :D). While looking through the documentation, one of the commands caught my attention.

Code:
RefPoint( ind :Label scale var [...] )
This reference point is used in the aircraft model files and uses an indirect position definition.
ind the keyword IND indicates that indirect positioning is used.
var the address of the variable area that holds the current position (Lat, Lon, Alt).
[...] v1= ##, v2= ##, optional

Okay, I get the label, v1, v2 values...but I am confused on the variable used in this case. Is there a variable that contains a current position w/ lat/lon/elev?

Looking at FSInterrogate, it looks like these values would be spread across several locations.

Also, would it be possible to pass a value to that variable via dll or another source? If so, couldn't this be used to adjust object positions without having to make it dynamic scenery.

Any ideas or thoughts on this would be awesome. Thanks!
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi David,

I am not sure. In general the variables you can access still need to be within the space that FS can read. So that means the choice is limited.

I have not come across this command a lot. I thought aircraft MDL files usually used another command to set the position. Or maybe that's only in ASM code and it translates to this SCASM command.
 
Messages
180
Country
us-california
Hey Arno, thanks for the quick response...

I am not sure. In general the variables you can access still need to be within the space that FS can read. So that means the choice is limited.

I figured that, and would most likely use the uservars (4 or 5) to pass a lat/lon/alt along (no idea what the format would need to be) as long as the aircraft was within a specific max/min lat, max/min lon box (as not to interfere with other uses of the uservars).

I have not come across this command a lot. I thought aircraft MDL files usually used another command to set the position. Or maybe that's only in ASM code and it translates to this SCASM command.

It is an interesting command, and I'm curious to see its possible use.

On a side note, I decompiled a few scasm bgls from various sceneries and I did find the use of this command in several AES sepecific files. It looks like Oliver referenced a var of "0002". I tried that and there was no result.

A similar command has me wondering too:
Code:
RefPoint( nsi :Label varptr [...] )
Referencepoint with no scale and with indirect position via varptr. (v1= ##; v2= ##; optional)

Only problem there is the lack of a definition for varptr...so I have no idea what it looks for.
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi,

Variable 0002 sounds more like a local variable inside the bgl. I use those for cat as well, but I don't think you can set them externally.

Send from my phone using Tapatalk, so excuse the short sentences and possible typos
 
Top