- Joined
- Aug 15, 2008
- Messages
- 448
Greetings everyone,
I've been attempting to create a trigger that, essentially, searches the map for specific markers (based on Circle of Power) on initialization and then forms a base around them.
It works fairly well, all things considered, but the problem lies in how buildings are placed: it's supposed to spawn 8 defensive structures (at 45, 90, 135, 180, 225, 270, 315 and 360 degrees) on the edge and every time there are cases where they get placed slightly off, as if the placement snapped to the next tile.
To illustrate:
The second column is what is expected (and usually happens), the third is how it actually works sometimes. It's especially noticeable on the diagonal ones.
As you may or may not have noticed, the trigger works by finding the base marker, finding its position and then placing the various structures by means of "points with polar offsets" (I can, of course, post the trigger if need be, I just figured it wasn't needed for this).
Just to be clear, I have placed everything by hand first and calculated the various distances first, all on an empty terrain as to avoid collision issues.
I have also tried working with raw coordinates (so adding/subtracting to the main point's X and Y) but the result has been the same.
Is there some way I can make sure those buildings snap in place where I want them?
If it helps, I'm working on patch 1.29.
Thanks in advance.
EDIT: added testmap in the attachments.
I've been attempting to create a trigger that, essentially, searches the map for specific markers (based on Circle of Power) on initialization and then forms a base around them.
It works fairly well, all things considered, but the problem lies in how buildings are placed: it's supposed to spawn 8 defensive structures (at 45, 90, 135, 180, 225, 270, 315 and 360 degrees) on the edge and every time there are cases where they get placed slightly off, as if the placement snapped to the next tile.
To illustrate:
The second column is what is expected (and usually happens), the third is how it actually works sometimes. It's especially noticeable on the diagonal ones.
As you may or may not have noticed, the trigger works by finding the base marker, finding its position and then placing the various structures by means of "points with polar offsets" (I can, of course, post the trigger if need be, I just figured it wasn't needed for this).
Just to be clear, I have placed everything by hand first and calculated the various distances first, all on an empty terrain as to avoid collision issues.
I have also tried working with raw coordinates (so adding/subtracting to the main point's X and Y) but the result has been the same.
Is there some way I can make sure those buildings snap in place where I want them?
If it helps, I'm working on patch 1.29.
Thanks in advance.
EDIT: added testmap in the attachments.
Attachments
Last edited: