Stuck on matching/getting data from 2 different loops a

		--print(CurrentPosition.X, PossibleMove.X, "starting X value")
		for i = CurrentPosition.X + Delta, PossibleMove.X, Delta do

			print(i, "X VALUE")
			
		end
		
		--print(CurrentPosition.Y, PossibleMove.Y, "starting Y value")
		for i = CurrentPosition.Y  + Delta, PossibleMove.Y, Delta do
			
			print(i, "Y VALUE")

		end

Im trying to make a vector2
the loops repeat multiple times
the top loop gets the x value’s and bottom gets the y value’s
it loops through the x’s first and the y’s second
I cant think of how to put the Proper x and y value together as theyre seperated

image
for example i’d want it to be vector2.new(2.,4) and vector2.new(3,4) instead of them being sdeperated
Pls lmk if needs more explaining

Create a temporary table to store the X values, in the second loop, print the X values and Y value combined by accessing the table.

1 Like

Problem with that is the loop doesnt run if the value is 0;
so if the x value doesnt move (0) a x value wont be inserted into the table
so the x and y’s will mismatch

Is it possible to do this?
;lgnbhr

i switched to a different method; this wasnt working

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.