AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Problem with making solid entity (https://forums.alliedmods.net/showthread.php?t=85682)

Speed! 02-14-2009 13:06

Problem with making solid entity
 
1 Attachment(s)
Im using this
PHP Code:

public make_shield(const Float:vOrigin[3])
{
    new 
i_Ent engfunc(EngFunc_CreateNamedEntity,g_EntMine);
    
set_pev(i_Ent,pev_classname,"shield");

    
set_pev(i_Ent,pev_frame,0);
    
set_pev(i_Ent,pev_body,3);

    
engfuncEngFunc_SetSizei_Ent,  {-30.0, -30.0, -40.0},  {30.030.040.0})
    
engfunc(EngFunc_SetModel,i_Ent,model_aura_shield);
    
engfuncEngFunc_SetOrigini_Ent vOrigin );

    
fm_set_rendering(i_Ent,kRenderFxGlowShell,255,255,255,kRenderTransAlpha,70)
    
set_task(10.3"remove_shield"i_Ent)
    
set_pev(i_Ent,pev_solid,SOLID_BBOX);


THE PROBLEM IS THAT THTE MODEL SHOWS RIGHT, BUT I CANT GO THROUGH IT

the model is attached
the model is wrong?
the code?
plz help, this is important for me :D

Arkshine 02-14-2009 13:10

Re: Problem with making solid entity
 
Try to set a size : EngFunc_SetSize

Speed! 02-14-2009 13:28

Re: Problem with making solid entity
 
Quote:

Originally Posted by arkshine (Post 761534)
Try to set a size : EngFunc_SetSize

where can i get the accuarate sizes?

AntiBots 02-14-2009 16:59

Re: Problem with making solid entity
 
I thinks that is {-4.0, -4.0, -5.0} for min & for max {4.0, 4.0, 5.0}

I dont know how to get it xd

Starsailor 02-14-2009 17:01

Re: Problem with making solid entity
 
use this
Code:

entity_set_int(entity,EV_INT_solid,SOLID_BBOX)

AntiBots 02-14-2009 17:03

Re: Problem with making solid entity
 
Quote:

Originally Posted by Starsailor (Post 761671)
use this
Code:

entity_set_int(entity,EV_INT_solid,SOLID_BBOX)

This is the same set_pev(i_Ent,pev_solid,SOLID_BBOX);

anakin_cstrike 02-15-2009 02:12

Re: Problem with making solid entity
 
PHP Code:

// Try this
engfuncEngFunc_SetOrigini_EntvOrigin );

// instead of 
/* set_pev(i_Ent, pev_origin, vOrigin ); */ 


SnoW 02-15-2009 08:32

Re: Problem with making solid entity
 
Quote:

Originally Posted by anakin_cstrike (Post 761827)
PHP Code:

// Try this
engfuncEngFunc_SetOrigini_EntvOrigin );
 
// instead of 
/* set_pev(i_Ent, pev_origin, vOrigin ); */ 


Won't help, the problem is like arkshine said. Sizes.
Quote:

Originally Posted by Starsailor (Post 761671)
use this
Code:

entity_set_int(entity,EV_INT_solid,SOLID_BBOX)

He's using fakemeta in every thing he does. Gimme a one reason why should he start using engine?
Quote:

Originally Posted by Speed! (Post 761546)
where can i get the accuarate sizes?

From the model's maker. You have to set them, so if you don't get better idea just guess them and test couple of times until you get them right.

Speed! 02-16-2009 10:58

Re: Problem with making solid entity
 
Ok, im asking the modeler about this. btw, i tried this with solid_bbox and sized that loooked to work, but it was really weird. like if i can go through it, but it turned laggy (my walking)
anybody?

xPaw 02-16-2009 11:14

Re: Problem with making solid entity
 
Quote:

Originally Posted by anakin_cstrike (Post 761827)
PHP Code:

engfuncEngFunc_SetOrigini_EntvOrigin ); 


take a look on fm_entity_set_origin();

PHP Code:

stock fm_entity_set_origin(index, const Float:origin[3]) {
    new 
Float:mins[3], Float:maxs[3];
    
pev(indexpev_minsmins);
    
pev(indexpev_maxsmaxs);
    
engfunc(EngFunc_SetSizeindexminsmaxs);

    return 
engfunc(EngFunc_SetOriginindexorigin);




All times are GMT -4. The time now is 16:59.

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