| Blockland Forums > Modification Help |
| Spawning a brick under a player |
| (1/4) > >> |
| Eeposs:
I've been working on a script and i hit a deadline once i couldn't figure out how i would spawn a brick directly under a player. can anyone list an example to help me out here? any help is appreciated . |
| elm:
What if the player is on the floor... I don't get it.. |
| Eeposs:
--- Quote from: elm on June 09, 2012, 06:30:24 PM ---What if the player is on the floor... I don't get it.. --- End quote --- I'm pretty sure i can adapt it to bump it up 1 stud. |
| elm:
--- Quote from: Eeposs on June 09, 2012, 06:36:15 PM ---I'm pretty sure i can adapt it to bump it up 1 stud. --- End quote --- Well, you need the player's position, then use vectorAdd() to set the bricks position. I'm not sure how much you need to add though. |
| ThinkInvisible:
Bricks generally have 0.25TU X and Y, and 0.3TU Z for 1 plate. Players are usually 5 bricks (1.5 TU) tall. 1.5*player.scale will get you their height in TU. I believe datablock.getBrickSizeZ() * 0.3 will get the brick's height. |
| Navigation |
| Message Index |
| Next page |