Author Topic: Fire Raycast From Eye Support  (Read 5620 times)

Fire Raycast From Eye Support
The next generation for shooting an invisible raycast from an eyepoint.

Description
Are you a scripter? Do any of your scripts involve something to happen to your player's targeted object? Well, this is the containerRaycast() function, but it's made easier and customized to fire it from the client's eyepoint! How to use:

Code: [Select]
%trgt=fireRaycastFromEye(client,range,typemask);
And here's an example of a kill-player script!

Code: [Select]
function serverCmdKillPlayer(%client)
{
%trgt=fireRaycastFromEye(%client,8,$Typemasks::PlayerObjectType);
if(isObject(%trgt))
{
%trgt.kill();
}
else
{
messageClient(%client,'',"You must be facing (and close to) a player in order to kill them.");
}
}

And make sure to copy + paste the Support_raycasts.cs from the zip into any add-on that uses this, and execute the support file using:

Code: [Select]
exec("./Support_raycasts.cs");
Or else the function won't work. Anyways, hope this helps you!

Download
Support_fireRaycastFromEye.zip (Last Updated: Fri May 22, 2009 2:29 pm)

Installation
Put Support_fireRaycastFromEye.zi p into the Add-Ons folder in your Blockland folder.

Click Here to view this file on the RTB Download Manager


I don't get it...

I think you have to be a scripter to understand it.


yay i like raycast gun :D

does this make you have better eyeballs 2 see

yay i like raycast gun :D

does this make you have better eyeballs 2 see

1. What the HECK is a "raycast gun"?
2. Better eyeballs to see? No....... this is a scripting resource.

I don't get it...

...

I think you have to be a scripter to understand it.

You don't.

It's a resource.

Yes.

yay i like raycast gun :D

does this make you have better eyeballs 2 see

Idiot.



This ends Duckmeister's comprehensive review of this thread.

Modification discussion.
Wrong section.

...

You don't.

Yes.

Idiot.



This ends Duckmeister's comprehensive review of this thread.
Perfect replies, short and to the point.

I think you're best off making it do a linear raycast instead of a container raycast. Wouldn't doing a container raycast make it so the target could be slightly off where you're looking?

1. What the HECK is a "raycast gun"?
2. Better eyeballs to see? No....... this is a scripting resource.

1. a raycast gun is were raycas tt p
2. resource

I think you're best off making it do a linear raycast instead of a container raycast. Wouldn't doing a container raycast make it so the target could be slightly off where you're looking?

No, I just tested it with my /getBrickName command. The center of your crosshair has to be facing the target.

If this works, it is amazing. Will try later!

This is not an add on. Also, this is what, 4 lines of script?

If it's a resource, it's not an add-on. This would probably be better somewhere else.