Blockland Forums > Modification Help

Forcing a player to equip a brick?

Pages: << < (4/4)

Nexus:


--- Quote from: phflack on March 15, 2012, 12:42:22 AM ---so, you can search through the brick groups based on position? handy
also, does this mean that you can get a specific position based on where the camera is pointing? at the ground/bricks/air (with a max distance)

--- End quote ---

--- Quote from: Lugnut1206 on March 14, 2012, 07:20:51 PM ---you can get your players coordinates, and you can get the direction they're looking, and you can get the distance between the eye point and the target

serverConnection.getcontrolob ject()

Don't know about the angle, but I'm positive it's possible

getFocusDistance()

then math

--- End quote ---


phflack:

just making sure that the coordinates from the player match up with the bricks
i wouldn't be surprised if they randomly didn't

Nexus:


--- Quote from: phflack on March 15, 2012, 07:55:01 PM ---just making sure that the coordinates from the player match up with the bricks
i wouldn't be surprised if they randomly didn't

--- End quote ---

position looking at is not position of the brick
it would get a position on the side of the brick/interior/terrain that the player is focused at.

phflack:

true, but from where it lands you could add a little bit more to the vector then round it to the nearest center brick grid area?
and how would you find if a brick contains a specific point? because nearest might not work if there's a 64*64 cube which you're looking at, and a 1*1 brick next to it

Pages: << < (4/4)

Go to full version