Raised This Month: $ Target: $400
 0% 

Entity Interaction Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 11-04-2007 , 17:09   Entity Interaction Problem
Reply With Quote #1

EDIT:
Fixed this by setting the model after I set the origin (which makes me assume you have to set the size first before the model).

----------------

I'm trying to spawn an entity that will interact with a player. It's working fine but there are a few problems I will mention below.

PHP Code:
new Float:origin[3], Float:mins[3], Float:maxs[3];

// It seems if I change the mins values any lower I can't interact?
mins Float:{-15.0, -15.0, -36.0};
maxs Float:{15.015.036.0};

pev(idpev_originorigin);

new 
ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"));
engfunc(EngFunc_SetModelent"some_model");
engfunc(EngFunc_SetSizeentminsmaxs);
engfunc(EngFunc_SetOriginentorigin);
set_pev(entpev_anglesangles);
set_pev(entpev_solidSOLID_TRIGGER);
set_pev(entpev_movetypeMOVETYPE_NONE);
set_pev(entpev_classname"some_classname");
set_pev(entpev_skin2);
set_pev(entpev_sequence1);
set_pev(entpev_framerate1.0);

// If I don't droptofloor I can't interact?
engfunc(EngFunc_DropToFloorent); 
I added comments to the spots that were causing problems.

Why would making the mins/maxs any smaller than what it is make it so I can't interact with the entity? Also, why if I don't drop the entity to the floor will it not let me interact?

I'm coding this for Counter-Strike, and when I was working with Team Fortress Classic I never had a problem like this. If someone knows what is going on please let me know.

Last edited by hlstriker; 11-06-2007 at 13:37.
hlstriker is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-04-2007 , 21:48   Re: Entity Interaction Problem
Reply With Quote #2

You do know that you missed a " ?
[ --<-@ ] Black Rose is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 11-04-2007 , 21:52   Re: Entity Interaction Problem
Reply With Quote #3

Nope I didn't know that. That isn't the problem though sadly, lol
hlstriker is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 11-06-2007 , 13:36   Re: Entity Interaction Problem
Reply With Quote #4

Fixed this by setting the model after I set the origin (which makes me assume you have to set the size first before the model).
hlstriker 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 01:18.


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