Author Topic: Possible to make shift not play a sound?  (Read 995 times)

The function shift(%brick,%x,%y,%z) is called when a player moves their ghost brick. It essentially just shifts %brick according to the parameters. When you call this, it also plays a little clicky sound coming from the brick. I'm wondering if there is a way to disable the playing of that sound.

delete that sound? (or replace it with a blank sound)

overwrite the function to move the temp brick over.  make it exactly the same thing as default minus the whole animation thing

delete that sound? (or replace it with a blank sound)
That's a terrible idea, why would you even suggest that?

That's a terrible idea, why would you even suggest that?
I dont know, its just ideas.

overwrite the function to move the temp brick over.  make it exactly the same thing as default minus the whole animation thing
I don't know how this would be accomplished. Shift is the only function I see in trace to move the brick. And I can't just recreate the brick in the new location as creating a brick plays a sound as well.

Also, I don't even know how I would go about removing the sound from the game. Trace doesn't reveal any serverPlay3D or similar functions.

I'm not sure this is possible without getting into the source code, I just wanted to see if anybody knew for sure.

Set the ghost brick's position.

[ghostbrickobject].position = vectorAdd([ghostbrickobject].position, "addX addY addZ");

I believe one brick is 0.5TU*0.5TU*0.3TU, but I'm not sure.

Set the ghost brick's position.

[ghostbrickobject].position = vectorAdd([ghostbrickobject].position, "addX addY addZ");

I believe one brick is 0.5TU*0.5TU*0.3TU, but I'm not sure.
Setting the variable like won't actually update the bricks physical position and using .setTransform() plays the sound.

I'd like to point a few things out here.

shift(%brick, %x, %y, %z) probably does use %brick.setTransform();.
Also, some functions don't show up in traces - such as JustAboutAnything::setTransform() and probably serverPlay3D. The only way to know for sure that it won't work is to try it and see.

I'd like to point a few things out here.

shift(%brick, %x, %y, %z) probably does use %brick.setTransform();.
Also, some functions don't show up in traces - such as JustAboutAnything::setTransform() and probably serverPlay3D. The only way to know for sure that it won't work is to try it and see.
Just tried packaging serverPlay3D to echo it's arguments when it's called, and it isn't called when I shift a brick around. I also tried serverPlay2D, GameConnection::play3D, and GameConnection::play2D.
When I call the function through console it echoes its arguments. So none of these are used to play the sound.

Any other functions I can try out that someone knows?