Raised This Month: $ Target: $400
 0% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bapa
New Member
Join Date: Mar 2005
Old 03-12-2005 , 14:46   entity_get_vector-origin returns X=0 Y=0 Z=0
Reply With Quote #1

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 :/
bapa is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-12-2005 , 15:39  
Reply With Quote #2

func_button is a brush entity. Use the get_brush_entity_origin(ent, Floatrig[3]) stock instead. I do not believe you can move a brush entity at all, though.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 03-12-2005 , 18:52  
Reply With Quote #3

You can move a brush entity. It just screws up.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-12-2005 , 21:05  
Reply With Quote #4

gg h4x n0es

I tried moving all func_button's to me. Nothing happened.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 03-13-2005 , 02:16  
Reply With Quote #5

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.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 03-13-2005 , 12:47  
Reply With Quote #6

would that have the same effect to a door?
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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