Author Topic: Rooting a player animation  (Read 866 times)

I made a script to package OnPlant and not allow planting of bricks in certain situations. The script works, but the player still makes the planting animation. I've tried playThread(2,root), but I don't really know what I'm doing and it doesn't work.
Also, it still makes the planting sound occasionally. I can live with this, but if anyone knows an easy way to stop it doing that it would be great.

Why can't you modify serverCmdPlantBrick to stop it from the beginning?

Why can't you modify serverCmdPlantBrick to stop it from the beginning?
I need the actual brick as an argument.
If you could tell me how to get the worldbox and position of the attempted brick from the client, that would be helpful too

You can try completely rewriting the plantBrick command instead of modifying part of it.

I need the actual brick as an argument.
If you could tell me how to get the worldbox and position of the attempted brick from the client, that would be helpful too

<client_object>.player.tempBrick.*

This just gave me an idea.

onBrickPlanted event; triggers when a player attempts to plant a brick on (possibly touching) the evented brick. and doesn't actually plant it.

You can try completely rewriting the plantBrick command instead of modifying part of it.
god almighty

<client_object>.player.tempBrick.*
I'm assuming that's the ghost brick. If it has the same world box as the actual brick that would be created, it should work great for me, thanks

god almighty
not that hard if you know how to create a brick, actually

not that hard if you know how to create a brick, actually
I was referring to the fact that it's an overcomplicated way to do something simple

Do what Port said with the ghost brick. It has the same worldbox and everything.

why couldn't you package playThread?

New question:
I can't call getUpBrick() or getDownBrick() on a ghost brick, and it would be helpful if I were able to. It's for a semi-custom floating protocol.

New question:
I can't call getUpBrick() or getDownBrick() on a ghost brick, and it would be helpful if I were able to. It's for a semi-custom floating protocol.
It hasn't been inserted into the brick grid yet, so it has no idea if there are bricks below or above it.

It hasn't been inserted into the brick grid yet, so it has no idea if there are bricks below or above it.
I feared as much
I traced trying to plant a brick in the air; It looked like the brick was planted for a split second because onAdd and onRemove were called.

Edit: I guess I really need to know now how to root the player now
« Last Edit: June 15, 2012, 08:32:46 PM by Treynolds416 »

>ignoring posts
psuedo code:
package [randomstuff]
player::playthread(%player,%thread,%slot)  i think
if player.root
return
else
parent
end package [randomstuff]