AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Entity solidity problem (https://forums.alliedmods.net/showthread.php?t=163276)

Erox902 07-28-2011 12:35

Entity solidity problem
 
Hey I've had a little problem with my entity, I was just watching Hawks tutorial on entities
So I decided to try it out but for some reason my entity isn't solid :?

I've check the dump file of the model to make sure that the size is correct.
I've also asked in the thread but yeah someone said I had to make a movetype,
didn't work either:?

So please someone who can help me with this problem?

PHP Code:

public spawn_entity(id)
{
    new 
Origin[3]
    
get_user_originidOrigin)
    
    new 
Float:SpawnOrigin[3]
    
IVecFVecOriginFloat:SpawnOrigin )
    
    new 
Ent create_entity"info_target" )
    
entity_set_stringEnt,EV_SZ_classname,g_Classname )
    
entity_set_modelEnt,g_Model )
    
entity_set_intEnt,EV_INT_solid,SOLID_BBOX )
    
entity_set_intEnt,EV_INT_movetype,MOVETYPE_NONE )
    
entity_set_sizeEnt,Float:{-43.7,-118.1,0.0},Float:{43.1,117.5,98.7} )
    
entity_set_edictEnt,EV_ENT_owner,id )
    
entity_set_originEntSpawnOrigin )



hleV 07-28-2011 15:16

Re: Entity solidity problem
 
Try setting the origin first, then model, solid and size.

Hunter-Digital 07-28-2011 15:35

Re: Entity solidity problem
 
MOVETYPE_NONE cancells any solid property, set it to MOVETYPE_FLY if you want it to have collisions but not gravity.

Erox902 07-29-2011 10:55

Re: Entity solidity problem
 
Quote:

Originally Posted by Hunter-Digital (Post 1520561)
MOVETYPE_NONE cancells any solid property, set it to MOVETYPE_FLY if you want it to have collisions but not gravity.

This acually sounded really great, but still no success:(


hlev: That didn't make it either:(

Flipper_SPb 07-29-2011 11:03

Re: Entity solidity problem
 
If you are owner of the entity with SOLID_BBOX, it will be solid for all players, except you

Flipper_SPb 07-29-2011 11:13

Re: Entity solidity problem
 
So do not set EV_ENT_owner if you don't really need it, or try another solid constants like (not sure) SOLID_BSB

Erox902 07-29-2011 12:26

Re: Entity solidity problem
 
Quote:

Originally Posted by Flipper_SPb (Post 1521067)
So do not set EV_ENT_owner if you don't really need it, or try another solid constants like (not sure) SOLID_BSB

Thank you that finally made it:)
Only problem now is I've made the entities size
lets say horizontal when the model is vertical. :mrgreen:

abdul-rehman 07-29-2011 13:57

Re: Entity solidity problem
 
Quote:

Originally Posted by Flipper_SPb (Post 1521061)
If you are owner of the entity with SOLID_BBOX, it will be solid for all players, except you

Wow, never knew that thnx, :up:


All times are GMT -4. The time now is 01:06.

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