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

Change Flashing "WigWag" Frequency

Messages
139
Country
unitedkingdom
Hi everyone

I've created 2 light boxes of LIGHT_BEACON_ names, set the timer to 0F0F0h, and arranged the code so that they flash alternately. This does work in FS, but however too slowly for UK wigwags. I have changed the timer in both directions (higher and lower numbers), and in both cases, it seems to alter the time of the 1st light box, but not the 2nd. Instead, it makes the 2nd longer to make up for the shorter time of the 1st, so I end up with one short light, then a really long one! The code I've now got is as follows:

Code:
ww_MasterScale_2 label BGLCODE

    IFMSK       nolgt_1, 0282h, 0F0F0h

    BGL_LIGHT LIGHT_BEACON, -0.325, 0.300, -0.112, 20, 0.60, 0.40, 0FFF8D548h, 0.000000, 0.000000, 1.000000 ; source poly num = 1013
    BGL_JUMP_32 nolgt_2
    nolgt_1       label BGLCODE

    BGL_LIGHT LIGHT_BEACON, 0.351, 0.300, -0.112, 20, 0.60, 0.40, 0FFF8D548h, 0.000000, 0.000000, 1.000000 ; source poly num = 1014
    nolgt_2       label BGLCODE
    BGL_RETURN

So from that I've increased 0F0F0h to say 0FF00h, and all it does it make the 1st one so short you miss it, then the second really long. If I then include the same code above the 2nd light, the 1st one comes on, but the second then doesn't show.

Hopefully that all makes sense, and if anyone has the solution to what I'm doing wrong, it would be greatly appreciated!

(Many thanks to Drew at dbsimulation+design for the original flashing light tutorial)

Thanks

Will
 
Hi,

With the IFMSK command you are checking if certain bits of the variable are high or not. So if you use a weird value the change that they are all high becomes lower and therefore your light will be displayed less (and the alternating light longer).

In this thread I tried to explain how it works, see post 4. Maybe that will help you in picking a better value?
 
Hi Arno

I had a look at that page you sent, and noticed that the values you had written were all binary. The code I pasted above was taken from here: http://www.fsdeveloper.com/forum/showthread.php?t=2122&highlight=wigwag, and that created a good but very slow set of alternating flashing lights. So I played about with the numbers. I tried out your binary values (and placed them in as hex), so I tested 01010h, 01111h, and 00101h, and toose worked as before (one short and one long).

So then I changed it then to 0A0A0h, and again one light flashes faster than the other. So I altered the code slightly to:

Code:
wigwag_fs9_MasterScale_2 label BGLCODE

    IFMSK       lgt_1, 0282h, 0A0A0h
    BGL_JUMP_32 nolgt_1
    lgt_1      label BGLCODE
    BGL_LIGHT LIGHT_BEACON, -0.325, 0.300, -0.112, 20, 0.60, 0.40, 0FFF8D548h, 0.000000, 0.000000, 1.000000 ; source poly num = 1013
    BGL_JUMP_32 nolgt_2
    nolgt_1       label BGLCODE

    lgt_2      label BGLCODE
    BGL_LIGHT LIGHT_BEACON, 0.351, 0.300, -0.112, 20, 0.60, 0.40, 0FFF8D548h, 0.000000, 0.000000, 1.000000 ; source poly num = 1014
    nolgt_2       label BGLCODE
    BGL_RETURN


bgl_riff_end_wigwag_fs9	label	BGLCODE

which gave an interesting effect. With that code, the lights flash in this sequence: 1-2-1-2------1-2-1-2------

So basically I've now got 4 flashes instead of 2, the first 3 of which are flashing in the exact time I'd like, with the 4th still staying on for too long. Is there any way to get the loop to return without the long delay?

Cheers

Will
 
Last edited:
Hi,

I don't know how much faster you want them, but I would suggest that you try 0F00h instead of F0F0h. That should make it faster.
 
Hi Arno

Unfortunately it's still delaying on the last light in the loop, so you get one short light, then one long. It appears that 0A0A0h is the correct speed, with the exception again of the last light in the loop, which is held on as a long delay before the loop starts again.

Will
 
I have run out of ideas, I guess I should just try it myself in FS. But it can be tricky indeed to get it right with the masks.
 
Hi Arno I can send you over the ASM source if you need. If not, I look forward to seeing of you can solve this little problem :)

Will
 
Hi everyone

For those wanting fast flashing wigwags I've finally found the code to speed up the alternate flashes:

Code:
wigwag_fs9_MasterScale_2 label BGLCODE

    IFMSK       lgt_1, 0282h, 0AAAAh
    BGL_JUMP_32 nolgt_1
    lgt_1      label BGLCODE
    BGL_LIGHT LIGHT_BEACON, -0.325, 0.300, -0.112, 20, 0.60, 0.40, 0FFF8D548h, 0.000000, 0.000000, 1.000000 ; source poly num = 1013
    BGL_JUMP_32 nolgt_2
    nolgt_1       label BGLCODE

    lgt_2      label BGLCODE
    BGL_LIGHT LIGHT_BEACON, 0.351, 0.300, -0.112, 20, 0.60, 0.40, 0FFF8D548h, 0.000000, 0.000000, 1.000000 ; source poly num = 1014
    nolgt_2       label BGLCODE
    BGL_RETURN


bgl_riff_end_wigwag_fs9	label	BGLCODE

Have fun.

Will
 
Back
Top