| 01-23-2006, 08:33 AM | #1 |
Also lets say i have a bunch of Buildings Scatterd threwout the man. theres are units whos Position is Undeterminded and i need these units to walk to The closest one of these Buildings |
| 01-23-2006, 08:45 AM | #2 |
Perform a distance between buildings and a sample unit from the population evaluation loop, returning the value of the closest building. Then order the population to move to the returned building value. |
| 01-29-2006, 06:15 PM | #3 |
there is no way to make them Get cloest item of type ? or target cloest building of type? |
| 01-29-2006, 07:31 PM | #4 |
Of course there is, but you have to find the closest building / item yourself. You need a loop that checks for all the distances from the building/item to the point and keep saving the closest one in a variable |
| 02-01-2006, 04:37 AM | #5 |
Alright the solution i have came up with leaves me with more questions how do i make the same unit be the Random 1 Unit From Units of type Be the same unit each time i i have a new if than else theres to many items and to many units(orgin) not many buildings but there not the point getting the units to the items is the hurdle to use varibles so im going to need to run like 7-12 If than elses that if Units current order not equal to whatever get item is called ? smart i suppose order (need to know how to do what i stated above other wise written like this witch doesnt work and will send any random unit to it and not stay focus on the unit)Order random 1 unit of units of type spider(i have random Conditions Filtering out some units) to Right Click Random item in range 300(not sure how to make this Focus On a sertin item of type) Then : do a if (same Condition) than(same Event +300 Range) else (again) |
