hey guys. This is more mathproblem than anything else. Basically what I have is a distance between two points, let's call them A and B for future reference. This distance could be called a theoretical line. I would like to chop this line up into 10 points (these are what I'm referring to as "parts" in the title) with point A being the very start of the line and point B being the very end. In other words, if the line stretches between (x=12, y=12) and (x12,y=120), I'd like point A to still be (x=12, y=12) and point B to be (x=12, y=120)!
So far I've done this by saving the value of the distance divided by 10 in a variable and run that value through a loop ten times, each time multiplying it by the loops' value. But this method only gives me either the A or B point, never both. I'm not a math guy, so I hope someone who is is willing to help me with this! <3
what does this have to do with triggers?
right now i have no idea what ur talking about and im thinking the reason would be helpful in the understanding
well, i managed to solve it. But what I meant was that I wanted to put 10 units evenly spread along a line. So I divided the distance by 10 (lets say this would equal x), then made a loop and created a unit at a certain point offset by x*loop 10 times. this would put a unit at x*1, x*2, x*3, x*4, x*5 etc..., in a line.
the problem was that this wouldnt put any units at one of the ends of the line if x was greater than 1.
store the x and y values of one point, and the x and y values of the difference between the two points divided by however many units you want to place minus 1. Then loop from 0 to the number of units and multiply i by the difference and add the coordinates of point A.
hey guys. This is more mathproblem than anything else. Basically what I have is a distance between two points, let's call them A and B for future reference. This distance could be called a theoretical line. I would like to chop this line up into 10 points (these are what I'm referring to as "parts" in the title) with point A being the very start of the line and point B being the very end. In other words, if the line stretches between (x=12, y=12) and (x12,y=120), I'd like point A to still be (x=12, y=12) and point B to be (x=12, y=120)!
So far I've done this by saving the value of the distance divided by 10 in a variable and run that value through a loop ten times, each time multiplying it by the loops' value. But this method only gives me either the A or B point, never both. I'm not a math guy, so I hope someone who is is willing to help me with this! <3
Thanks in advance
well, i managed to solve it. But what I meant was that I wanted to put 10 units evenly spread along a line. So I divided the distance by 10 (lets say this would equal x), then made a loop and created a unit at a certain point offset by x*loop 10 times. this would put a unit at x*1, x*2, x*3, x*4, x*5 etc..., in a line.
the problem was that this wouldnt put any units at one of the ends of the line if x was greater than 1.
store the x and y values of one point, and the x and y values of the difference between the two points divided by however many units you want to place minus 1. Then loop from 0 to the number of units and multiply i by the difference and add the coordinates of point A.
thanks <3