View Single Post
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-14-2006 , 20:01   Re: Finding Entites
Reply With Quote #4

...no. Origin is a vector. That means that it's a coordinate on the map somewhere.

A vector is represented through 3 cells, usually as floats. When dealing with coordinates, it basically looks like this:

Code:
new Float:Vector[3] Vector[0] // this is the x value (left/right) Vector[1] // this is the y value (forward/back) Vector[2] // this is the z value (up/down)

It isn't exactly like that per se (since if you're looking in different directions they're not really left/right and forward/back) but that's as close a representation I can give with text.

Here's how you represent a static vector:
Code:
Float:{100.0,-300.0,400.0}

which means x is 100, y is -300, z is 400, etc.

This param in the function find_sphere_class is used when you want to search around a location where there is no ent, such as the point a player is aiming at. I've only used this function like twice before, and once was to make an explosion effect around a location that a player was looking (using origin and not _aroundent), and another was finding players around a player when they used a command (using _aroundent and not origin).
__________________
Hawk552 is offline
Send a message via AIM to Hawk552