Author Topic: Toggle Tool Raycast  (Read 987 times)

I don't know if tools (wrench, hammer, printer, spray can, duplicator, fillcan etc.) use raycasts but it sounds like a reasonable assumption to me. What I'm asking is a command /ttr <#> that temporarily disables the tool raycasting for the client who sent that command. This would be really useful in small scaled builds or reaching that single brick behind the desk attached to a wall.

You could simply say /ttr to toggle the raycasting until the command is inputted again or /ttr <number> to disable raycasting for the amount of seconds inputted. That way when you know you only need to reach a brick or two nearby you don't have to waste time saying /ttr again.

Badspot

  • Administrator
If you disable raycasting how would the tool work exactly?  It does a raycast to determine what brick to hit. 

Is it possible to selectively disable the raycasting? Ignore the bricks that have raycasting turned off but not the ones that have it on?

Well, it is actually something i thought of myself too.
I have had it multiple times that i actually wanted to reach a brick behind a, for example, no raycast brick and i just couldn't manage to wrench it because there were just too many bricks in front of it (which i just couldn't remove).

A raycast hits a brick, but if you are in ttr mode it like ignores the brick ('continues' (makes new raycast at position of the hit with a no raycast brick) the raycast without triggering the tool for that brick).
I find it hard to explain. :S
But i can see why Demian wants this and if i am not horribly mistaken, this should be possible in some way.

Is it possible to selectively disable the raycasting? Ignore the bricks that have raycasting turned off but not the ones that have it on?
Very easily.

Only problem is you would need to rewrite all the tools onFire functions.

Very easily.

Only problem is you would need to rewrite all the tools onFire functions.
weaponImage::onFire(%this)
{
if(%this.getclassname() $= "wrenchimage" || %this.getclassname... etc
{do stuff
}
parent::
}

If you disable raycasting how would the tool work exactly?  It does a raycast to determine what brick to hit. 
Doesn't the wrench overwrite that?

I'd like to see this done.