there's a reason why checking a line collision will not work, this is because it will be in contact with the line for a lot of frames, and each frame it is in contact with the line will increment the speed, basically passing one branch would increase the speed exponentially
I believe what
wagyu said is the easiest way to do this:
in your branch objects do this:
make a new event > other > outside room
and then put this in a code block:
this means that every time a branch goes offscreen, the counter will increase by 1.
to check for every 10 branches a very VERY simple way is to use the modulo expression which will return 0 for every multiple of [x] if x = 10, so: 0, 10, 20, 30, 40, 50.
so in your two objects you are using to create branches you can check this state and if
global.gotsagofest is a multiple of 10, then set it to that value / 10, e.g:
if global.gotsagofest is 0 then the speed will be 0 / 10 which is 0;
if global.gotsagofest is 10 then the speed will be 10 / 10 which is 1;
if global.gotsagofest is 50 then the speed will be 50 / 10 which is 5;
like this:
Code:
if ( global.gotsagofest mod 10 == 0 ) // if it is a multiple of 10
{
global.branchSpeed = global.gotsagofest / 10;
}
the speed will be in a seperate variable such as global.branchSpeed, you would then use this speed value to control how fast your branches are spawned! QwQ