AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   How do I get an entity's position? (https://forums.alliedmods.net/showthread.php?t=84400)

Darkimmortal 01-25-2009 12:16

How do I get an entity's position?
 
I need a way of getting the position of entities from FindEntityByClassname - can it be done?

I've already searched the Wiki, API and Forum to no avail.


The plugin is designed for TF2, if that makes a difference.

bl4nk 01-25-2009 12:27

Re: How do I get an entity's position?
 
Code:

new Float:position[3];
GetEntPropVector(entity, Prop_Send, "m_vecOrigin", position);


Darkimmortal 01-25-2009 12:30

Re: How do I get an entity's position?
 
Thanks :D

+karma :)

Downtown1 02-16-2009 00:42

Re: How do I get an entity's position?
 
This definitely should be considered as a utility function like GetEntityVectorOrigin or something.

Because I was a newb and tried to use GetClientAbsOrigin or GetClientEyeOrigin to get the origin of a witch (L4D) and it kept giving me errors saying it wasn't a valid client index!

I mean sure it wasn't a valid client index, I just couldn't figure out a way till CrimsonGT suggested using the m_vecOrigin netprop.

At least TeleportEntity works on Entities :).


All times are GMT -4. The time now is 19:08.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.