AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Entity disappearing under the ground (https://forums.alliedmods.net/showthread.php?t=347246)

abdelwahab 04-14-2024 09:12

Entity disappearing under the ground
 
Hello!,
So here is the thing i created entity when i say ent
PHP Code:

        static Float:flOrigin[3]; get_entvar(plrvar_originflOrigin);
        
engfunc(EngFunc_SetModelg_pPlayerEnt[plr], g_szModel);
        
set_entvar(g_pPlayerEnt[plr], var_originflOrigin);
        
set_entvar(g_pPlayerEnt[plr], var_mins, {-19.3, -8.970.0});
        
set_entvar(g_pPlayerEnt[plr], var_maxs, {19.38.9712.76});
        
set_entvar(g_pPlayerEnt[plr], var_solidSOLID_NOT);
        
set_entvar(g_pPlayerEnt[plr], var_movetypeMOVETYPE_TOSS);
        
set_entvar(g_pPlayerEnt[plr], var_gravity1.0); 

the thing is when im near the wall and create the ent, the ent goes under the ground and disappear totally, it disappear slowing the gravity don't effect it.
Thanks!

mlibre 04-14-2024 14:17

Re: Entity disappearing under the ground
 
I guess you have to upload it more than the current origin

according to the "Z" coordinates

JocAnis 04-17-2024 04:57

Re: Entity disappearing under the ground
 
@mlibre do you understand [2] is axis for the Z/height? better remove that drawing :D

georgik57 04-17-2024 09:56

Re: Entity disappearing under the ground
 
it's because of the size. you spawn it inside the wall so it goes through.
edit: and the solid_not property. pretty self explanatory. if it's not solid it will be able to move through walls.

Natsheh 04-17-2024 10:12

Re: Entity disappearing under the ground
 
You are spawning the entity origin inside the world.

mlibre 04-17-2024 13:41

Re: Entity disappearing under the ground
 
@JocAnis fixed you understand me where things were going ;)

abdelwahab 04-17-2024 14:10

Re: Entity disappearing under the ground
 
Quote:

Originally Posted by mlibre (Post 2820959)
I guess you have to upload it more than the current origin

according to the "Z" coordinates


This didn't help, thanks tho

abdelwahab 04-17-2024 14:30

Re: Entity disappearing under the ground
 
Quote:

Originally Posted by Natsheh (Post 2821076)
You are spawning the entity origin inside the world.

Any ideas how to fix that, thx

mlibre 04-17-2024 19:10

Re: Entity disappearing under the ground
 
how have you applied it

abdelwahab 04-18-2024 05:14

Re: Entity disappearing under the ground
 
I added what u said to the z axis flOrigin[2] += 10.0


All times are GMT -4. The time now is 18:40.

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