AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   entity_get_vector-origin returns X=0 Y=0 Z=0 (https://forums.alliedmods.net/showthread.php?t=11215)

bapa 03-12-2005 14:46

entity_get_vector-origin returns X=0 Y=0 Z=0
 
Code:

new startButton, Float:ori[3]
startButton = -1
while((startButton = find_ent_by_class(startButton,"func_button")) > 0) {
  entity_get_vector(startButton, EV_VEC_origin, ori)
  client_print(0, print_console, "buttonid[%d] X[%d] Y[%d] Z[%d]", startButton, ori[0], ori[1], ori[2])
}

anyone that can give me a pointer why?

ps: it returns a buttonid correctly... AND %f only gives me 0.00000 instead :/

XxAvalanchexX 03-12-2005 15:39

func_button is a brush entity. Use the get_brush_entity_origin(ent, Float:orig[3]) stock instead. I do not believe you can move a brush entity at all, though.

Twilight Suzuka 03-12-2005 18:52

You can move a brush entity. It just screws up.

XxAvalanchexX 03-12-2005 21:05

gg h4x n0es

I tried moving all func_button's to me. Nothing happened.

Twilight Suzuka 03-13-2005 02:16

No no, the ENT will move. The MODEL does not. If you returned the origin of them, it would return near you, even if you cannot see them. Try doing it to something relatively big. you'll be able to walk through where it once was once you moved it.

TotalNoobScripter 03-13-2005 12:47

would that have the same effect to a door?


All times are GMT -4. The time now is 13:57.

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