Author Topic: Spawning a brick under a player  (Read 927 times)

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 .

What if the player is on the floor... I don't get it..

What if the player is on the floor... I don't get it..
I'm pretty sure i can adapt it to bump it up 1 stud.

I'm pretty sure i can adapt it to bump it up 1 stud.

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.

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.
« Last Edit: June 09, 2012, 07:20:00 PM by 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.
Hehehe thanks, i figured it out though.

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.
um

a 1x1F takes up a 0.5x0.5x0.2 TU area


you could probably look at the autobridge script to see a way to do it

Just so you know, a player is 3 TU tall

Just so you know, a player is 3 TU tall
so that would make a plate be around 3/14 of a TU tall? 0.21 seems like an odd number to pick

so that would make a plate be around 3/14 of a TU tall? 0.21 seems like an odd number to pick
A plate is .2 TU tall
Where did you get 3/14?

Check out the autobridge script. If you don't know where to find it, Google always helps.

Check out the autobridge script. If you don't know where to find it, Google always helps.
I have 2 different versions of it, but I somehow broke them LOL
I can't figure out how to fix it, but oh well.

A plate is .2 TU tall
Where did you get 3/14?
you said a player is 3 TU tall
a player is around 14 plates tall
3/14 is 3/14?