Raised This Month: $ Target: $400
 0% 

entity not solid:(


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
avril-lavigne
Banned
Join Date: Apr 2009
Old 11-07-2014 , 04:24   entity not solid:(
Reply With Quote #1

PHP Code:

        
new Float:MinBox[3], Float:MaxBox[3]
        new 
ent create_entity("info_target")
            
        
entity_set_string(ent,EV_SZ_classnamemegaclass)    
        
entity_set_int(entEV_INT_solidSOLID_BBOX)
    
entity_set_int(entEV_INT_movetypeMOVETYPE_FLY)
        
    
MinBox[0] = -3.0;    MinBox[1] = -3.0;    MinBox[2] = -3.0
    MaxBox
[0] =  3.0;    MaxBox[1] =  3.0;    MaxBox[2] =  3.0
    entity_set_vector
(entEV_VEC_minsMinBox)
    
entity_set_vector(entEV_VEC_maxsMaxBox)    
                    
                                      
        
entity_set_origin(entfOrigin)                                            
    
entity_set_model(ent,T_MDL)
    
entity_set_int(entEV_INT_team1)
    
entity_set_float(ent,EV_FL_nextthink,halflife_time() + 1.0
I still can walk thru it
func_breakable is not an option
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc

Last edited by avril-lavigne; 11-07-2014 at 04:26.
avril-lavigne is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-07-2014 , 05:19   Re: entity not solid:(
Reply With Quote #2

Extraced from one of my plugins, it may help you:
Code:
static iEnt; iEnt = create_entity( "info_target" ) static Float: fEntityMins[ 3 ]; fEntityMins = Float:{ -30.0, -20.0, -21.0 } static Float: fEntityMaxs[ 3 ]; fEntityMaxs = Float:{  30.0,  20.0,  29.0 } engfunc( EngFunc_SetOrigin, iEnt, vecOrigin ) set_pev( iEnt, pev_solid, SOLID_BBOX ) engfunc( EngFunc_SetModel, iEnt, szModel ) engfunc( EngFunc_SetSize, iEnt, fEntityMins, fEntityMaxs ) set_pev( iEnt, pev_classname, szClassName ) set_pev( iEnt, pev_mins, fEntityMins ) set_pev( iEnt, pev_maxs, fEntityMaxs ) set_pev( iEnt, pev_absmin, fEntityMins ) set_pev( iEnt, pev_absmax, fEntityMaxs ) //set_pev( iEnt, pev_movetype, MOVETYPE_FLY )//you may not need it.
__________________

Last edited by HamletEagle; 11-07-2014 at 06:22.
HamletEagle is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 11-07-2014 , 06:18   Re: entity not solid:(
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
Extraced from one of my plugins, it may help you:
Code:
static iEnt; iEnt = create_entity( "info_target" ) static Float: fEntityMins[ 3 ]; fEntityMins = Float:{ -30.0, -20.0, -21.0 } static Float: fEntityMaxs[ 3 ]; fEntityMaxs = Float:{  30.0,  20.0,  29.0 } engfunc( EngFunc_SetOrigin, iEnt, vecOrigin ) set_pev( iEnt, pev_solid, SOLID_BBOX ) engfunc( EngFunc_SetModel, iEnt, szModel ) engfunc( EngFunc_SetSize, iEnt, fEntityMins, fEntityMaxs ) set_pev( iEnt, pev_classname, szClassName ) //set_pev( iEnt, pev_movetype, MOVETYPE_FLY )//you may not need it.
Just that is enough to create a solid entity.
Avril i guess what was missing in your code was this: engfunc( EngFunc_SetSize, iEnt, fEntityMins, fEntityMaxs )
__________________
Jhob94 is online now
ezio_auditore
Senior Member
Join Date: May 2013
Old 11-09-2014 , 00:38   Re: entity not solid:(
Reply With Quote #4

Try This maybe
Code:
new Float:fOrigin[3], Float:fAngle[3], Float:fVelocity[3] pev(id, pev_origin, fOrigin) pev(id, pev_v_angle, fAngle) new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target")) entity_set_string(ent, EV_SZ_classname, "ent_name") entity_set_edict(ent, EV_ENT_owner, id) entity_set_model(ent, ENT_MODEL) entity_set_origin(ent, fOrigin) entity_set_vector(ent, EV_VEC_angles, fAngle) new Float:MinBox[3] = {-1.0, -1.0, -1.0} new Float:MaxBox[3] = {1.0, 1.0, 1.0} entity_set_vector(ent, EV_VEC_mins, MinBox) entity_set_vector(ent, EV_VEC_maxs, MaxBox) entity_set_int(ent, EV_INT_solid, SOLID_BBOX) entity_set_int(ent, EV_INT_movetype, MOVETYPE_FLY) entity_set_edict(ent, EV_ENT_owner, id) VelocityByAim(id, 2500, fVelocity) entity_set_vector(ent, EV_VEC_velocity, fVelocity)

This is from one of my plugins. Works nice.
__________________

Last edited by ezio_auditore; 11-09-2014 at 00:42.
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
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 17:30.


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