AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solid entity wont be solid ... (https://forums.alliedmods.net/showthread.php?t=84955)

kossolax 02-03-2009 12:20

Solid entity wont be solid ...
 
Hello

I would like to spawn a solid entity but its wont work


here is my code


PHP Code:

public test(id) {
    new 
Float:Aim[3], Float:origin[3]
    
    
velocity_by_aim(id64Aim)
    
pev(idpev_originorigin)
    
origin[0] += Aim[0]
    
origin[1] += Aim[1]

    new 
ent spawn(idorigin)
    
g_ent[id] = ent
}
public 
spawn(idFloat:origin[3])
{    
    new 
ent create_entity("info_target");
    if(!
ent) return 0

    
new class_name[32]
    
format(class_name,31,"ent_test");
    
    
set_pev(entpev_classnameclass_name,31)
    
set_pev(entpev_movetypeMOVETYPE_PUSH// TOSS 
    
set_pev(entpev_solidSOLID_BBOX)
    
engfunc(EngFunc_SetModelent"models/base.mdl")    
    
engfunc(EngFunc_SetSizeentFloat:{-16.0, -16.00.0}, Float:{16.016.032.0} )

    
set_pev(entpev_ownerid)
    
set_pev(entpev_health500.0)
    
set_pev(entpev_takedamage1)
    
    
set_pev(entpev_originorigin)
    
    
engfunc(EngFunc_DropToFloorent)
    
    return 
ent


its spawn the entity but cannot be solid


anyone can help me please ?

padilha007 02-03-2009 12:30

Re: Solid entity wont be solid ...
 
you make the precache event?

kossolax 02-03-2009 12:41

Re: Solid entity wont be solid ...
 
yes, I see it correctly but I can walk in it ... :(

padilha007 02-03-2009 13:19

Re: Solid entity wont be solid ...
 
put all code hear

Dr.G 02-03-2009 13:32

Re: Solid entity wont be solid ...
 
try and make the size bigger so u are 100% sure its not solid. I think i can remember a player model is like 72 high or something like that. So 16 is pretty small..

kossolax 02-03-2009 14:36

Re: Solid entity wont be solid ...
 
it isnt the size

and its
-16 in min and 16 in max

so 16 + 16 = 32

32 = player size ... :P

and even with 320 still not working ....


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

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