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

Bgl_tick18

Messages
30
Country
greece
Hi,

I am attempting to create an animated flag, using one texture switching between differend areas of it... Using the timer BGL_TICK18 as
Code:
Hellas_flag_MasterScale_1 label BGLCODE
    MATERIAL 0,0 ; <255,255,255,255> HELLAS.BMP;;;
BGL_ZBIAS 1
IFMSK flag00, BGL_TICK18,0008h
    DRAW_TRI_BEGIN 0, 4
    DRAW_TRI    2,   3,   0 ; poly=2 part=1
    DRAW_TRI    1,   0,   3 ; poly=1 part=1
    DRAW_TRI_END
    BGL_JUMP_32 flagend
flag00 label word
    DRAW_TRI_BEGIN 4, 4
    DRAW_TRI    2,   3,   0 ; poly=2 part=1
    DRAW_TRI    1,   0,   3 ; poly=1 part=1
    DRAW_TRI_END
    BGL_JUMP_32 flagend
    DRAW_TRI_BEGIN 8, 4
    DRAW_TRI    2,   3,   0 ; poly=2 part=1
    DRAW_TRI    1,   0,   3 ; poly=1 part=1
    DRAW_TRI_END
    BGL_JUMP_32 flagend
    DRAW_TRI_BEGIN 12, 4
    DRAW_TRI    2,   3,   0 ; poly=2 part=1
    DRAW_TRI    1,   0,   3 ; poly=1 part=1
    DRAW_TRI_END
    BGL_JUMP_32 flagend
    DRAW_TRI_BEGIN 16, 4
    DRAW_TRI    2,   3,   0 ; poly=2 part=1
    DRAW_TRI    1,   0,   3 ; poly=1 part=1
    DRAW_TRI_END
    BGL_JUMP_32 flagend
    DRAW_TRI_BEGIN 20, 4
    DRAW_TRI    2,   3,   0 ; poly=2 part=1
    DRAW_TRI    1,   0,   3 ; poly=1 part=1
    DRAW_TRI_END
    BGL_JUMP_32 flagend
    DRAW_TRI_BEGIN 24, 4
    DRAW_TRI    2,   3,   0 ; poly=2 part=1
    DRAW_TRI    1,   0,   3 ; poly=1 part=1
    DRAW_TRI_END
    BGL_JUMP_32 flagend
    DRAW_TRI_BEGIN 28, 4
    DRAW_TRI    2,   3,   0 ; poly=2 part=1
    DRAW_TRI    1,   0,   3 ; poly=1 part=1
    DRAW_TRI_END
flagend label word
BGL_ZBIAS 0
    BGL_RETURN
, witch switchs between two parts only...I wish to switch between the 8 differend areas I 've already created, one after the other... the broblem that occurs is that trying differend jumps into my code I managed either to switch between two parts, or between one and all the others together, or one and nothing... my question is... is it possible to switch into one after the other my eight parts, or this timer is been used just as a two parts switcher?..:banghead:
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,843
Country
netherlands
Hi,

You are only doing one check, that is why you can't do 8 switches. Try something like this:

Code:
Hellas_flag_MasterScale_1 label BGLCODE
MATERIAL 0,0 ; <255,255,255,255> HELLAS.BMP;;;
BGL_ZBIAS 1
IFMSK flag00, BGL_TICK18,2000h
    DRAW_TRI_BEGIN 0, 4
    DRAW_TRI    2,   3,   0 ; poly=2 part=1
    DRAW_TRI    1,   0,   3 ; poly=1 part=1
    DRAW_TRI_END
    BGL_JUMP_32 flagend
flag00 label word
IFMSK flag01, BGL_TICK18,4000h
    DRAW_TRI_BEGIN 4, 4
    DRAW_TRI    2,   3,   0 ; poly=2 part=1
    DRAW_TRI    1,   0,   3 ; poly=1 part=1
    DRAW_TRI_END
    BGL_JUMP_32 flagend
flag01 label word
IFMSK flag02, BGL_TICK18,6000h
    DRAW_TRI_BEGIN 8, 4
    DRAW_TRI    2,   3,   0 ; poly=2 part=1
    DRAW_TRI    1,   0,   3 ; poly=1 part=1
    DRAW_TRI_END
    BGL_JUMP_32 flagend
flag02 label word
IFMSK flag03, BGL_TICK18,8000h
    DRAW_TRI_BEGIN 12, 4
    DRAW_TRI    2,   3,   0 ; poly=2 part=1
    DRAW_TRI    1,   0,   3 ; poly=1 part=1
    DRAW_TRI_END
    BGL_JUMP_32 flagend
flag03 label word
IFMSK flag04, BGL_TICK18,A000h
    DRAW_TRI_BEGIN 16, 4
    DRAW_TRI    2,   3,   0 ; poly=2 part=1
    DRAW_TRI    1,   0,   3 ; poly=1 part=1
    DRAW_TRI_END
    BGL_JUMP_32 flagend
flag04 label word
IFMSK flag05, BGL_TICK18,C000h
    DRAW_TRI_BEGIN 20, 4
    DRAW_TRI    2,   3,   0 ; poly=2 part=1
    DRAW_TRI    1,   0,   3 ; poly=1 part=1
    DRAW_TRI_END
    BGL_JUMP_32 flagend
flag05 label word
IFMSK flag06, BGL_TICK18,E000h
    DRAW_TRI_BEGIN 24, 4
    DRAW_TRI    2,   3,   0 ; poly=2 part=1
    DRAW_TRI    1,   0,   3 ; poly=1 part=1
    DRAW_TRI_END
    BGL_JUMP_32 flagend
flag06 label word
    DRAW_TRI_BEGIN 28, 4
    DRAW_TRI    2,   3,   0 ; poly=2 part=1
    DRAW_TRI    1,   0,   3 ; poly=1 part=1
    DRAW_TRI_END
flagend label word
BGL_ZBIAS 0
BGL_RETURN

I am not sure about the values of the masks, as I did not try them. But it should get close...
 
Messages
30
Country
greece
Hi,

that looks like it works... I had just to write the values as 0002h instead of 2000h etc. Animation is a bit wird, but I will try differends, just to see what happends... if I will get something intresting I will post it...

thanks Arno
 
Messages
16
Country
norway
Need to borrow one question here.
I have three polygons that are going to be shown chronologically. Currently they show as poly1, poly2, poly1, poly3 and then start from beginning. My code is like this:
Code:
    SEPARATION_PLANE di20, HEADING_VECTOR_X, 0, HEADING_VECTOR_Y, 2351032
      IFMSK dia00, BGL_TICK18,0020h
    	DRAW_TRI_BEGIN 0, 4
    	DRAW_TRI    2,   3,   1 ; poly=2 part=1
    	DRAW_TRI    1,   0,   2 ; poly=1 part=1
    	DRAW_TRI_END
    	BGL_JUMP_32 diend
      dia00 label word
      IFMSK dia01, BGL_TICK18,0040h
    	DRAW_TRI_BEGIN 4, 4
    	DRAW_TRI    2,   3,   1 ; poly=2 part=1
    	DRAW_TRI    1,   0,   2 ; poly=1 part=1
    	DRAW_TRI_END
    	BGL_JUMP_32 diend
      dia01 label word
    	DRAW_TRI_BEGIN 8, 4
    	DRAW_TRI    2,   3,   1 ; poly=2 part=1
    	DRAW_TRI    1,   0,   2 ; poly=1 part=1
    	DRAW_TRI_END
di20 label word
This is one of a chain of images shown in the "display" wich is based on distance from viewpoint. So in other words this code results in vert0-3 shown first then vert4-7 then vert0-3 then vert8-11 and starts over again.

Can I make them go vert0-3 -> vert4-7 -> vert8-11?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,843
Country
netherlands
Hi,

It depends on the mask value you use. You now use 20h and 40h. Which means that in all other cases the last one is shown.
 
Messages
374
Country
italy
Is possible to work on 12 switches? the time fractions with 18hz timer what would be?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,843
Country
netherlands
What do you mean with 12 switches? It is probably easier to have a number of checks that is a power of 2, so 8 or 16.
 
Messages
374
Country
italy
Ops, I meant frames. I agree, should be easier to work with power of 2. With 16 I would have a smooth animation among frames. I may just adapt the code below and change the IFMSK condition?
 
Messages
470
Country
hungary
I was exactly looking for this.

I want to create a Guard light. It should change the mapping with BGL_TICK18 (left light off right light on than left on right off) in a texture.

But the draw TRI is drawing triangles correct? How can I do the mapping?

Is there any tutorial?

Thanks!
 
Top