PDA

View Full Version : SCASM question



OBIO
February 16th, 2011, 21:31
I am working on a FS9 project and have need of some SCASM help. I know, I know....bringing FS9 stuff into CFS2 land borders of blasphemy, but it is here in The Basement that the SCASM wizards dwell.

Here's the thing. Working on updating and improving a freeware FS9 plane that has bombs and drop tanks that show when the lights are turned on. I would like to have the key command assignment for the drop tanks and bombs changed to an unused command so that when the lights are turned on, just the light turn on and so that if a person wants the drop tanks during daytime, they don't have to fly around with all the lights on.

Is it possible to change the key command assignment for the drop tanks and bombs to the wing fold or tail hook command? And if so, is there a SCASM wizard willing to take a crack at making the changes?

OBIO

bearcat241
February 17th, 2011, 14:20
Obio, if there's an xml link in the mdl between the lights and the weapons (which is usually the case with these types of setups), it might be more expedient to skip scasm editing and just go directy to the maker who can modify the source files.

igacci
February 17th, 2011, 15:02
Hi, OBIO


Is it possible to change the key command assignment for the drop tanks and bombs to the wing fold or tail hook command?


I believe it's possible.

Once you decompile a .bgl or a .mdl, there will be "IfVar()" commands that controls conditional
appearance with token variables. Token variables are integer numbers and are assigned to
specific commands or conditions, such as lights on.
I'm afraid I don't have the complete list of token variables handy. Some google search is
required.

Basic scheme is that serch IfVar() comes with token for lights on command, then swap the
token (the integer number) to tail hook command.

Let's say the light on command is assigned to number 20 and tail hook to 30. Do text-search for
"IfVar()", check if each "IfVar()" has 20 in thier parameter (argument in the bracket). If it has,
then change number 20 to 30.

Difficult part is that there are some other variations of commands that also relate to condition of
appearance such as "IfVarRange()". They have different bevhavior and come with specific
syntax. Also, there can be more than one arguments in brackets. They are not token variables
but other parameters that deterimin specic range or conditions (such as distance, time and
damage). Be sure which argument is the token variables you are looking for.

Daisuke