0
\$\begingroup\$

I have an adm object, which draws the path in the room like this (Object ADM - Draw Event):

draw_set_color(c_black);

repeat(5){
    repeat(5){
        draw_path(circuito_australia,684+i,568+j,false);
        j+=1;
    }
    i+=1;
    j=0;
}

i=0;
j=0;

Result:

enter image description here

I created 2 viewports, to more closely display specific cars:

enter image description here

And this problem happens, parts of the circuit in the view of these cameras are wrong/bugged:

enter image description here

The reason I know (or at least I imagine) is because I'm taking a part of the room and doubling its display.

Any ideas on how to get around this?

\$\endgroup\$
0
\$\begingroup\$

I believe the solution I found is not unique.

Just on the game screen (with the code of the question itself) take a printscreen and add as a sprite in the game.

Problem and printscreen:

enter image description here

Obviously the printscreen has to be taken without the objects present in the circuit being visible. Just disable the visibility of objects.

The code looks like this:

draw_sprite(spr_circuit,0,0,0);

repeat(5){
    repeat(5){
        draw_path(circuito,x0+i,y0+j,false);
        j+=1;
    }
    i+=1;
    j=0;
}

Result:

enter image description here

I did a test and found that after drawing the circuit image, the following part of the code becomes unnecessary (draw_path):

repeat(5){
    repeat(5){
        draw_path(circuito,x0+i,y0+j,false);
        j+=1;
    }
    i+=1;
    j=0;
}

Just need to draw the printscreen you took (draw_sprite(spr_circuit,0,0,0);).

So you only need to use the function (draw_path) to get the printscreen out.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.