LuaPlayer::can_reach_for_build(position) -- Returns true if the player can reach this position for building as if the player tried to build it from cursor.
Currently there is no reliable way to get the build distance and Player.can_reach_entity returns true on ghosts no matter what the build distance is.
Request Player.can_reach_for_build
Re: Request Player.can_reach_for_build
The player can always build ghosts at any distance... and can always reach ghosts at any distance to deconstruct them.
If you want to get ahold of me I'm almost always on Discord.
Re: Request Player.can_reach_for_build
Correct. Which is why I would like a way to find the build_distance for reviving ghosts via script as long as they are inside the players build range.Rseding91 wrote:The player can always build ghosts at any distance... and can always reach ghosts at any distance to deconstruct them.
Re: Request Player.can_reach_for_build
So maybe access to these player prototype values would solve this:Nexela wrote:Correct. Which is why I would like a way to find the build_distance for reviving ghosts via script as long as they are inside the players build range.Rseding91 wrote:The player can always build ghosts at any distance... and can always reach ghosts at any distance to deconstruct them.
Code: Select all
build_distance = 6,
drop_item_distance = 6,
reach_distance = 6,
item_pickup_distance = 1,
loot_pickup_distance = 2,
reach_resource_distance = 2.7,
Re: Request Player.can_reach_for_build
That would work also and allow for even more flexibility.
Re: Request Player.can_reach_for_build
I added the ability to read the different reach distances off the character runtime. Reading it off the character includes the force based bonus as well as the character based bonus.
If you want to get ahold of me I'm almost always on Discord.