Raised This Month: $ Target: $400
 0% 

Angles refuse to set.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Drak
Veteran Member
Join Date: Jul 2005
Old 05-17-2007 , 13:39   Angles refuse to set.
Reply With Quote #1

I can't seem to create an entity, then set it's angles.
Code:
MakeEnt() {     new ent2 = fm_find_ent_by_class(-1,"info_target")     new Float:origin[3]     new Float:angles[3]         pev(ent2,pev_origin,origin)     pev(ent2,pev_angles,angles)         // Create the trigger_push     new trigger = fm_create_entity("trigger_push");//engfunc(EngFunc_CreateEntity,engfunc(EngFunc_AllocString,"trigger_push"))     if(!pev_valid(trigger)) {         server_print("[SCREAM] Unable to create entity.");         return FMRES_IGNORED;     }                 // KeyValues     fm_set_kvd(trigger,"speed","100")     set_pev(trigger,pev_origin,origin);         //engfunc(EngFunc_SetSize, trigger, Float:{-273.0, -589.0, -976.0}, Float:{-192.0, -525.0, -910.0});     //engfunc(EngFunc_SetOrigin,trigger,origin);         set_pev(trigger,pev_angles,angles);                 dllfunc(DLLFunc_Spawn,trigger); }

If i call "dllfunc(DLLFunc_Spawn,trigger);" the entity creates/works fine.
But it does NOT set it's angles/size. If i don't call it, it set's it's angles/size, but doesn't work. Anyone know why this is happening?
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
pRED*
Join Date: Dec 2006
Old 05-17-2007 , 16:12   Re: Angles refuse to set.
Reply With Quote #2

Have you tried setting the angles after you spawn the entity?
pRED* is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 05-17-2007 , 19:07   Re: Angles refuse to set.
Reply With Quote #3

Yeah, which didn't seem to work ether.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 05-17-2007 , 19:20   Re: Angles refuse to set.
Reply With Quote #4

trigger_push is a brush-based entity, so you need to assign absolute dimensions.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Reply


Thread Tools
Display Modes

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 10:42.


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