S
Slothagami
Guest
Hey Everyone, so i went in WAAAAAAAAAAAAAAAAY over my head with this water physics calculations stuff, i need to find the number of water instances in an area (in the same y because they are in a grid) from the edges witch are set as LeftX and RightX, this is the last part of the equation that i need to make the water work and its just as difficult as the rest as i have never attemptedanything like this before.
here is the attempt i have made, if it helps
thanks in advance!
here is the attempt i have made, if it helps
Code:
var Count, PreviousInstance, CurrentInstance;
Count = 0;
PreviousInstance = noone;
for(i = 0; i > WidthOfContainer; i++){
CurrentInstance = instance_place(LeftX + i, y, oWater);
if(CurrentInstance != noone and CurrentInstance != PreviousInstance){
PreviousInstance = CurrentInstance;
Count++;
}
}
var FinalCount;
FinalCount = Count;