#Does it has latency to call surface_set_target from a script?
1 messages · Page 1 of 1 (latest)
the surface stack is, well, a stack
you have to make sure that there's one surface_reset_target for every surface_set_target otherwise you get that error
if you're calling the script multiple times but only resetting the target once, for example
ik, but when I change my code from my custom script to surface_set_target, there is no error
when my funni script only consist of this
function Battle_Masking_Start() {
var board = battle_board;
if instance_exists(board) and depth >= board.depth
{
var surface = board.clip_surface;
surface_set_target(surface);
}
}
if I were to use Battle_Masking_Start, the stack happens
but when I straight up using surface_set_target, there is no bug
when the purpose is literally the same
including accounting for the if statement?
Well that should have done nothing different because the statement is true
Unless the if statement actually contribute to the latency?