What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

ConstructHouse coordinates

Status
Not open for further replies.

Symerith

New Member
Joined
Nov 1, 2014
Messages
20
Reaction score
0
I know the ConstructHouse functions depends on 2 coordinates, X and Y.
If I want to build on myself, I can write like this: ConstructHouse(me.X, me.Y)

But what if I want to place a house/scarecrow on the ground and retrieve the coordinates of the middle of it? Is that possible with AB?

Exemple: demolition in a few minutes, I place my house where I want it to be, and the plugin just spams build and confirm..

Thanks for any information
 
But what if I want to place a house/scarecrow on the ground and retrieve the coordinates of the middle of it? Is that possible with AB?
Code:
if (x % 4 != 0)
                {
                    if (x % 4 <= 2)
                        x -= (x % 4);
                    else
                        x = x + 4 - (x % 4);
                }
                if (y % 4 != 0)
                {
                    if (y % 4 <= 2)
                        y -= (y % 4);
                    else
                        y = y + 4 - (y % 4);
                }
 
Hey Out,

Why do we need to add this portion of code for building the house?

In the case where you target the house being demo'd, can you just use me.target.X, me.target.Y, me.target.Z and after you have the correct plan you want to place,
simple say: (Item) myPlanItem.ConstructHouse(me.target.X, me.target.Y, me.target.Z)? I have tested this a bit and the success rate seems to work most of the time.
 
You dont need to add this code, this code build in into ConstructHouse method. But Symerith ask how he can calculate house coordinates
 
Status
Not open for further replies.
Back
Top