| Blockland Forums > Modification Help |
| Forcing a player to equip a brick? |
| << < (3/4) > >> |
| Lugnut:
--- Quote from: phflack on March 14, 2012, 07:05:05 PM ---damn that's big, i'll have to start figuring out how it works :Daww, that'd be very useful --- End quote --- 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 |
| Nexus:
--- Quote from: phflack on March 14, 2012, 07:05:05 PM ---aww, that'd be very useful --- 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 --- yea that although realize that that alone doesn't get the brick, it just is another way to help figure out where to start looking for the brick. If you want a brief explanation of how the code works: 1. Set groups to look through 2. Search through group to find ghostbricks 3. Identify nearest ghostbrick (keep in mind nearest =/= yours) 4. Use position of nearest ghostbrick to find nearest planted brick 5. gat |
| Lugnut:
you can get positions of bricks clientsided? the forget |
| Nexus:
--- Quote from: Lugnut1206 on March 14, 2012, 08:44:28 PM ---you can get positions of bricks clientsided? the forget --- End quote --- It is a requirement for saving the bricks, yes. |
| phflack:
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) |
| Navigation |
| Message Index |
| Next page |
| Previous page |