Effect placement (SCASM)

From FSDeveloper Wiki
Jump to: navigation, search

A very easy way to place effect files in your scenery using SCASM. In the new SCASM this command is mentioned:

GObj( EFFECT "string1" "string2" )

The use of the different strings is not documentated, but after some trial and error I found that the first string is the name of the effect file (eg. Nova_smoke_one.fx). The second string are additional parameters that can be passed to the effect. If you for example enter MOY=1:6;DOM=1 then the effect will only be visible on the first day of the first 6 months of the year. For more details see the file "Effects Parameters.txt" that is part of the Effects SDK. If you want no additional parameters you can just enter 0 for the string.

All other parameters for the effect file that can be specified in the BGLPlacer tool from the SDK (latitude, longitude, etc) can be specified in SCASM using the normal way (in the RefPoint for example).

This makes it very easy to add an effect to your macro. No need anymore to make a separate macro for the effect or even a seperate BGL using BGLPlacer.

Tip: Don't forget the Set( fsvers 0x800 ) command in your SCASM source that tells SCASM to use the Fs2002 code, otherwise you will get an error.