LongBeardedLion Expert Cheater
Reputation: 0
Joined: 10 Apr 2020 Posts: 173
|
Posted: Sat Oct 03, 2020 9:53 am Post subject: RTS building coordinates layout grid snap. |
|
|
Im working on Age of Empires 2.
i found the function that builds buildings. Im able to call this function and build a building anywhere in the map. Which is super cool.
But i digged a little bit more deep, and found yet another function that deals with building stuff in lines. Like when you build a wall it makes all the walls in a line? I can do that for houses, and barracks, and any type of building.
The trick i do for now is simply, calling the function that makes WALL lines,
and change it to a house. So that way it makes a line of houses.
But like most RTS's, it has a grid, and depending on the size of the building you are choosing it will snap differently to the grid. So when i call the function and change it to a house, it makes the line of houses, however it makes them disagligned with the grid, because it assumes it was about to build a wall. As you can see in the image.
I reversed quite a lot already. And i still dont know what can i do to fix this problem. I can also post a video soon.
What do you suggest me i do to find a fix for this?
Pls help.
Description: |
|
Filesize: |
304.07 KB |
Viewed: |
903 Time(s) |

|
Description: |
|
Filesize: |
178.46 KB |
Viewed: |
905 Time(s) |

|
|
|